javascript - JqueryUI Datepicker cannot correctly handle initial values -


i have following simple datepicker in jqueryui:

$('#id_due_date').datepicker().datepicker("option", "dateformat", "yy-mm-dd"); $('#id_due_date').datepicker("setdate",                              new date($("input#id_due_date").attr("value"))); 

so, if has value shows date instead of blank (second line of code above).

however, i'm having following difficulties:

  1. i want able show month of initial value in calendar. if date 3 months ahead, want show month in calendar.
  2. with code, if i'm not setting initial value, defaults today, kind of wrong application items can have missing due_date

can please help?

  1. new date javascript native method , expects javascript dateformat correct
  2. check out alt field, altfield in jq ui
  3. use datepicker({option:value})
  4. check changemonth option in jq ui
  5. check change year option in jq ui

Comments

Popular posts from this blog

apache - Add omitted ? to URLs -

redirect - bbPress Forum - rewrite to wwww.mysite prohibits login -

php - How can I stop spam on my custom forum/blog? -