| Subcribe via RSS

Jason’s Date Input Calendar

May 12th, 2008 | No Comments | Posted in javascript by dreamluverz

Just check the source of this post below for the js code and sample. Anyway if you got them already You can use the additional info for your quick reference.

Additional Information

Below describes function “DateInput()” in detail, which you need to understand to take full advantage of this script:



DateInput(DateName, Required*, DateFormat*, DefaultDate*)

All parameters with a * are optional, and if not passed in a value, the default value is used.

DateName STRING - required. Name of the hidden form element to store the selected, formatted date  You do NOT need to create this field manually in your form.
Required BOOLEAN - optional. Default = FALSE (TRUE or FALSE). Determines whether user is required to make a date selection. If set to false (default), an extra “blank” field appears at the top of the month select menu (above January), in which selecting it causes nothing to be passed to the form.
DateFormat STRING- optional. Default is set as a global variable in the script (MM/DD/YYYY on this page). The format of the generated Date value. It can be one of the following:

  • YYYYMMDD
  • YYYY-MM-DD *
  • YYYY-DD-MM *
  • YYYY/MM/DD *
  • YYYY/DD/MM *
  • YYYY-DD-MON *   **
  • YYYY-MON-DD *   **
  • MM-DD-YYYY *
  • DD-MM-YYYY *
  • MM/DD/YYYY *
  • DD/MM/YYYY *
  • DD-MON-YYYY *   **
  • MON-DD-YYYY *   **

*   2-digit year can be used instead of 4-digit year
** 3-character month name abbreviation can also be specified as MMM.

DefaultDate STRING- optional. The default date displayed in the drop down menus. If none is specified, today’s date is used.

Source: http://www.dynamicdrive.com/dynamicindex7/jasoncalendar.htm

Tags: , , , ,