arian/mootools-datepicker — Issue #106: minDate not working + date placed in wrong field
Author: ladymeg
Created: 2012-02-14 21:56:45+00:00
State: open

I've been using this on a number of different forms and have come across two issues. I'm using nearly the exact same code from form to form, so I'm not sure why this is happening sometimes.

1) minDate is ignored on some forms...when you open the calendar pop-up, it starts in December 1969.

2) After you click on a date from the pop-up calendar, it places it in the text input field ABOVE the date input field. I've gotten around it so far by rearranging my form so the date picker is first or so it has something else like a select box dropdown right above it.

Here is a sample of what I'm using...can anyone help me figure out what I'm doing wrong?

window.addEvent('load', function() {
new Picker.Date($$('input'), {
pickerClass: 'datepicker_jqui',
toggleElements: '.date_toggler',
format: '%m/%d/%Y',
startDay: 0,
minDate: '2012-02-14',
availableDates: {
2012: {
02:[17, 24],
03: [ 02, 09, 16, 23, 30],
04: [ 06, 13]
}
}
});
});