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:
- i want able show month of initial value in calendar. if date 3 months ahead, want show month in calendar.
- with code, if i'm not setting initial value, defaults today, kind of wrong application items can have missing due_date
can please help?
- new date javascript native method , expects javascript dateformat correct
- check out alt field,
altfield
in jq ui - use datepicker({option:value})
- check changemonth option in jq ui
- check change year option in jq ui
Comments
Post a Comment