Reputation: 15048
is there a better (more elegant way - in datepicker itself maybe?) way to set the last selected date in datepicker after page reload than to fill the cookie after each date select and then inputing the date from cookie to datepicker on reload.
edit: question rephrase: is there a better (more elegant way - in datepicker itself maybe?) way to set the last selected date in datepicker after page reload.
The way I am doing it now is: once the date is selected in the datepicker I set the cookie, and then when the page reloads I set the current datepicker value to the one from the cookie (if available).
Now, what I was asking is: is there an option in datepicker to do this more elegantly like for example this:
$("dateWrapper").datepicker({cookie:'yes'});
Upvotes: 1
Views: 2998
Reputation: 50982
Upvotes: 1