back to the Calendar Date Picker script
property | allowed values | array | explanation | example | default |
debug | true, false | true: error-messages will be shown. false: they won't | true | false | |
excludeDays | 0,1,2,3,4,5,6 | yes | 0=sunday, 1=monday, 2=tuesday, 3=wednesday, 4=thursday, 5=friday, 6=saturday these days will be shown, but won't be available. |
[6,0] | [] |
excludeDates | yyyymmdd | these days will be shown, but won't be available. for example, a holidays. | ['20081225','20081226'] | ||
minimumDate | yyyymmdd | any day before this date will be shown, but won't be available. | 20040101 | ||
maximumDate | yyyymmdd | any day after this date will be shown, but won't be available. | 20101231 | ||
weekStartsAt | 0,1,2,3,4,5,6 |
0=sunday, 1=monday, 2=tuesday, 3=wednesday, 4=thursday, 5=friday, 6=saturday this will allow you to determine how the date should be shown. where the the day, month & year are positioned and which character should be used to to seperate them. use the following characters for indication: %d : day %m : month %y : year (case sensitive) |
%m-%d-%y | %d-%m-%y | |
minimumFutureDate | integer,bool | yes |
array of two elements, the first an integer1, the second a boolean2 integer: this is the minimumDate defined as the offset from the current date. So, if the minimumDate should be 5 days in to the future, you enter 5 boolean: by setting this to true it will take excluded days & dates into consideration. So, if it's monday and you have entered 5 as int. and weekend days are excluded, then the first minimumDate will be next monday. when this value is false, excluded days are not considered. |
[5, false] | [] |
minimumFutureDate | integer |
NOTE: this is the same function as the one described directly above The difference is that you can also pass a single integer value instead of an array. The boolean value will be automatically added and take it's default value true |
5 | 0 | |
startYear | integer | this is the bottom-value of the years shown in the selectbox of the calendar | 1990 | current year3 | |
endYear | integer | this is the bottom-value of the years shown in the selectbox of the calendar | 2010 | current year + 10 |
There are also some (public) functions which allow you to set some of these values once an object has been instantiated:
var cdp = new CalendarDatePicker(); cdp.setYears(startYear, endYear); // setFutureDate is to set minimumFutureDate: cdp.setFutureDate(offset); cdp.setFutureDate(offset, boolean);Apart from that, you can - of course - also set the properties directly once the the object is created. Like this:
var cdp = new CalendarDatePicker(); cdp.minimumDate = null;