Hi,
Haven't posted for a while so please bear with me. I have a date picker which I sourced from http://www.nsftools.com/tips/DatePickerTest.htm & it works really well.
I've now been asked if there is anyway to exclude the user from selecting the current month or make it default to 4 weeks ahead?? I have looked at the source code & am by no means a javascript expert .
Could you please take a look & see what lines I need to change in order to achieve my goal??
I have attached the code in a zip file as I couldn't include it in this post
thanks,
john.
function refreshDatePicker(dateFieldName, year, month, day)
{
// if no arguments are passed, use today's date; otherwise, month and year
// are required (if a day is passed, it will be highlighted later)
var thisDay = new Date();
if ((month >= 0) && (year > 0)) {
thisDay = new Date(year, month+1, 1);
} else {
day = thisDay.getDate();
thisDay.setDate(1);
}
At least 98% of internet users' DNA is identical to that of chimpanzees
Fang,
This works for the initial datepicker but if they choose a date of say '18/08/2008' & then decide to change this it then loads the month of September & there is no way of going back to August!!!
Bookmarks