DatePicker日期选择器

日期选择


移植于http://foundation-datepicker.peterbeno.com

dt:

时间选择

dt:

Options参数

Name type default description
Format string 'yyyy-MM-dd' the date format, combination of yyyy-MM-dd HH:mm
Language string 'zh-CN' en | zh-CN
WeekStart integer 0 day of the week start. 0 for Sunday - 6 for Saturday
StartView integer month set the start view mode. Accepts: 'decade' = 4, 'year' = 3, 'month' = 2, 'day' = 1, 'hour' = 0
MinView|MaxView integer set a limit for view mode. Accepts: 'decade' = 4, 'year' = 3, 'month' = 2, 'day' = 1, 'hour' = 0
PickTime boolean false enables hour and minute selection views, equivalent of minView = 0, else minView = 2
InitialDate date string null sets initial date. The same effect can be achieved with value attribute on input element.
StartDate date -Infinity disables all dates before given date
EndDate date Infinity disables all dates after given date
KeyboardNavigation boolean true with input fields, allows to navigate the datepicker with arrows. However, it disables navigation inside the input itself, too
DaysOfWeekDisabled Array of integers [] disables all dates matching the given days of week (0 = Sunday, 6 = Saturday)
DatesDisabled Array of date [] disables the specified dates

文档