asmaoui / jquery-datepicker

Automatically exported from code.google.com/p/jquery-datepicker
0 stars 0 forks source link

Issue where a date is picked and then input field is emptied and date picker is re-triggered #5

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
From: http://plugins.jquery.com/node/4690

If you pick a date and it populates the text field and then return to that
text field and erase the value. When you select the datepicker again it
pops up with the year 1908 selected.

Recommend changing to

var d = Date.fromString(this.value);
if (d) {
controller.setSelected(d, true, true);
}

TO::>
if(this.value.indexOf('')){
var d = Date.fromString(this.value);
if (d) {
controller.setSelected(d, true, true);
}
}

Original issue reported on code.google.com by kelvin.l...@gmail.com on 12 Dec 2008 at 10:43

GoogleCodeExporter commented 9 years ago
To rephrase the problem - when a date picker previously had a date and now 
doesn't
then the calendar opens on the earliest available date (as definted by 
startDate).

Original comment by kelvin.l...@gmail.com on 17 Dec 2008 at 4:36

GoogleCodeExporter commented 9 years ago
Fixed in r15

Original comment by kelvin.l...@gmail.com on 17 Dec 2008 at 4:40