minDate not working + date placed in wrong field #106

Closed
ladymeg opened this Issue Feb 14, 2012 · 3 comments

Comments

Projects
None yet
3 participants

ladymeg commented Feb 14, 2012

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]
}
}
});
});

nosli commented Apr 26, 2012

Hi,
For issue 1.
Did you try Date.parse(datestring) for minDate?

ladymeg commented Apr 26, 2012

It was actually the 2nd line of code causing the problem...once I changed it to ".date" (the specific class on my date field) instead of "input" (the first input tag on the page) everything worked fine. Silly jQuery misunderstanding.

Collaborator

SergioCrisostomo commented Jan 26, 2014

I consider this solved and close this now. Cheers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment