Ribbon Datepicker properties
note
add datepicker snippet
Usage
const data = [
{
type: "datePicker",
id?: string | number,
parent?: string,
value?: string | Date,
valueFormat?: string | "date",
dateFormat?: string,
disabledDates?: (date: Date) => boolean,
icon?: string,
label?: string,
mark?: (date: Date) => string,
mode?: "calendar" | "year" | "month" | "timepicker", // "calendar" by default
placeholder?: string,
thisMonthOnly?: boolean, // false by default
timeFormat?: 24 | 12, // 24 by default
timePicker?: boolean, // false by default
weekNumbers?: boolean, // false by default
weekStart?: "saturday" | "sunday" | "monday", // "sunday" by default
css?: string | string[],
disabled?: boolean,
editable?: boolean,
hidden?: boolean,
width?: string,
},
// more Ribbon controls
]
Description
type
- (required) the type of a control, set it to"datePicker"
, if not specified - the navItem type is applied by defaultid
- (optional) the id of a control, auto-generated if not setparent
- (optional) the parent of the itemvalue
- (optional) the value of a datepickervalueFormat
- (optional) defines the format of the output date (either a string or a Date object)dateFormat
- (optional) the format of dates, by default "%d/%m/%y", check the Calendar properties for more details. The date format must include delimiters (space or symbol), otherwise an error will be throwndisabledDates
- (optional) allows disabling some date intervals, day labels are dimmed. Read the detailsicon
- (optional) an icon for a Datepicker, the name of the icon from the used icon fontlabel
- (optional) specifies an AREA label for the controlmark
- (optional) adds a CSS class to specific days. Read the detailsmode
- (optional) the mode of displaying of the datepicker every time the user opens itplaceholder
- (optional) a tip for the inputthisMonthOnly
- (optional) hides dates of the previous/next months relative to the currently displayed onetimeFormat
- (optional) defines the time format for a timepicker in the datepickertimePicker
- (optional) adds a timepicker into the datepicker. Use thetimeFormat
property to define the format of displaying time in the timepickerweekNumbers
- (optional) defines whether to show the numbers of weeksweekStart
- (optional) sets the starting day of the weekcss
- (optional) adds style classes to a Datepicker controldisabled
- (optional) defines whether a Datepicker control is disablededitable
- (optional) allows a user to enter the value of the control manually; false by defaulthidden
- (optional) defines whether a Datepicker is hiddenwidth
- (optional) the width of the field
Example
Related article: Datepicker