It seems a simple thing but i’m unable to solve it and i really need this. How can i add a date to a selected date, through the SelectedDate event?
I need to perform a date range limit on 2 datepickers. Once the user set one datepicker the other needs to only allow date equals to the selected date of the first datepicker, plus one month.
Example: if i set ‘3 of march’ on the first calendar, the second must allow only dates greater than ‘3 of april’.
So far by now i can only get the same selected date or the one i set through $('#dtpicker').datepicker( "setDate" , '+1m');. I tried the jquery-ui documentation example, but nothing.
I have implemented similar functionality on two datepickers.
Use this method in the
onSelecthandler of your datepickers (as init option):I think this is similar to what you need, if not then it should definitely get you on the right track.