Comments (4)
If you are using a database, you can pass the data to the server and do the logic there and if price already exists for that date, simply replace it.
And yes, there is no easy way to do it. You have to do everything the hard way, defining your own functions and logic.
from bootstrap-year-calendar.
Yup, of course I'm storing the data in a database, and that was my original intention, to collect the data server-side and break each period there, storing each day separately. So, I won't even bother checking for overlapping periods. I'll be sorting the periods by ID, and store the price of each period for the appropriate day. Then, if another period along the line has some overlapping days, (having sorted them by ID) will make sure that the prices are the newer ones, so it'll be good.
While using the calendar, I won't have a problem either, as I'm using the background-color property instead of the underlining for periods, so the latest color will be visible at any moment.
Anyway, thanks for confirming my idea, and thanks for the super fast reply.
PS: I have two more issues, but I'll open separate topics for them.
from bootstrap-year-calendar.
No problem, man! I like your idea and it seems you have all figured out so should be able to do it fairly easily ;)
from bootstrap-year-calendar.
I put quite some thought into it! :)
from bootstrap-year-calendar.
Related Issues (20)
- Full Example - Name and location dont populate
- TypeError: $(...).calendar is not a function
- listed bellow HOT 1
- [Bug] IE11 can not display box-shadow correctly
- disabled day
- How to overlap only with first day of range
- Bug: WeekNumber is one week too late
- Project still active? HOT 6
- Issue With Bootstrap 4 : Months Calendar Box is showing vertical HOT 1
- Other customize Date style
- Change outlook of RangeSelection
- how customize contextMenuItems?
- Need event for when you click on a day of the week
- March 31 no displayed HOT 2
- Trouble Rendering Datasource from SQL query
- Could someone add the German language to this package?
- Date's from database not showing in the calendar on Safari browser HOT 1
- add Arabic language
- Add Belarusian translation
- Show prices on each day
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bootstrap-year-calendar.