开发者

keeping the selected date after page reload in jQuery datepicker

is there a better (more elegant way - in datepicker itself maybe?)开发者_如何学C 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'});


  • You can post your date to session variable via ajax & put it into value in HTML
  • You can save it to cookies
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜