I’m using JQuery datepicker to allow user select a day and book something.
then I save the date in database,
later on I get the dates out of database and disable those days in datapicker so next user can’t select the booked days.
so far so good.
when a user select the day they want to book I need to disable the day after too.
I’m using php to save the chosen date in database together with some other information about user.
then i use ajax to load the dates thru php again and disable them.
how can i disable the they after? do I do it with php or javascript?
I have no idea how to get the day after selected date and how to save it? or should i save it or just add it later on when I get back the first date from ajax call and then loop thru the dates and get the day after with some function?
I would use PHP if you can by simply returning a list of dates to the
beforeShowDaymethod of your DatePicker.When you are adding a date from the database to the list, also use
strtotime($Date, '1 day')to add the next day.Edit: