Options
All
  • Public
  • Public/Protected
  • All
Menu

Class DatePickerConfig

Hierarchy

Implements

Index

Properties

Optional appendTo

appendTo: string | Element | JQuery = "body"

Optional autoValidate

autoValidate: boolean = false

Optional autoclear

autoclear: boolean = true

Optional autoclose

autoclose: boolean = false

选中日期后自动关闭 Whether or not to close the datepicker immediately when a date is selected.

Optional autofocus

autofocus: boolean = false

Optional bodyCls

bodyCls: string

Optional bodyStyle

bodyStyle: string

Optional calendarWeeks

calendarWeeks: boolean = false

是否在最左边显示这是当年第几周 Whether or not to show week numbers to the left of week rows.

Optional clearBtn

clearBtn: boolean = false

清除按钮 If true, displays a “Clear” button at the bottom of the datepicker to clear the input value. If “autoclose” is also set to true, this button will also close the datepicker.

Optional cls

cls: string = ""

The CSS class to add to this widget's element

Optional colorMode

colorMode: ColorMode

Optional data

data: any = null

Optional dataModel

dataModel: Klass<ListModel> = ListModel

Optional dataQuery

dataQuery: string | HttpRequest

Optional datesDisabled

datesDisabled: string | string[]

禁用日期 Array of date strings or a single date string formatted in the given date format.

default

[]

Optional daysOfWeekDisabled

daysOfWeekDisabled: string | number[]

Days of the week that should be disabled. Values are 0 (Sunday) to 6 (Saturday). Multiple values should be comma-separated. Example: disable weekends: '06' or '0,6' or [0,6].

Optional daysOfWeekHighlighted

daysOfWeekHighlighted: string | number[]

Days of the week that should be highlighted. Values are 0 (Sunday) to 6 (Saturday). Multiple values should be comma-separated. Example: highlight weekends: '06' or '0,6' or [0,6].

Optional defaultViewDate

defaultViewDate: string | Date

Date to view when initially opening the calendar. The internal value of the date remains today as default, but when the datepicker is first opened the calendar will open to defaultViewDate rather than today. If this option is not used, “today” remains the default view date.

Optional disabled

disabled: boolean = false

Optional embedded

embedded: boolean = false

stantiating the datepicker on a simple div will give an embedded picker that is always visible.

Optional faceMode

faceMode: LineInputFaceMode | Array<LineInputFaceMode> = LineInputFaceMode.square

Optional format

format: string = "YYYY-MM-DD"
see

Date.format

default

'YYYY-MM-DD'

Optional height

height: string | number

Optional hidden

hidden: boolean = false

Optional i18n

i18n: I18NResource | URLString = null

I18N resource.

Optional Readonly id

id: string

Optional iniValue

iniValue: string | Date

Optional innerIcon

innerIcon: string | LineInputIcon

Optional inputCls

inputCls: string = ""

Optional inputStyle

inputStyle: string = ""

Optional leftAddon

leftAddon: string | LineInputAddon

Optional listeners

Optional locale

locale: Locale = "en"

A locale string, like 'en', 'en-us', 'zh'.

Optional maxDate

maxDate: Date | string

最大日期 The latest date that may be selected; all later dates will be disabled. Date should be in local timezone. String must be parsable with format.

Optional maxlength

maxlength: number = Infinity

Optional minDate

minDate: Date | string

最小日期 The earliest date that may be selected; all earlier dates will be disabled. Date should be in local timezone. String must be parsable with format.

Optional multidate

multidate: boolean | number

Enable multidate picking. The input’s value (if present) is set to a string generated by joining the dates, formatted, with multidateSeparator.

Optional multidateSeparator

multidateSeparator: string = ","

The string that will appear between dates when generating the input’s value.

default

','

Optional name

name: string = ""

Optional orientation

orientation: "auto" | "lt" | "lb" | "rt" | "rb" = "auto"

方位 A space-separated string consisting of one or two of “left” or “right”, “top” or “bottom”, and “auto” (may be omitted); for example, “top left”, “bottom” (horizontal orientation will default to “auto”), “right” (vertical orientation will default to “auto”), “auto top”. Allows for fixed placement of the picker popup. “orientation” refers to the location of the picker popup’s “anchor”; you can also think of it as the location of the trigger element (input, component, etc) relative to the picker. “auto” triggers “smart orientation” of the picker. Horizontal orientation will default to “left” and left offset will be tweaked to keep the picker inside the browser viewport; vertical orientation will simply choose “top” or “bottom”, whichever will show more of the picker in the viewport.

Optional outline

outline: boolean = false

Optional placeholder

placeholder: string = ""

Optional readonly

readonly: boolean = false

Optional renderTo

renderTo: string | Element | JQuery = null

Render to DOM element.

Optional rightAddon

rightAddon: string | LineInputAddon

Optional sizeMode

sizeMode: SizeMode = SizeMode.md

Optional startView

startView: 0 | 1 | 2 | 3 | 4

开始视图 The view that the datepicker should show when it is opened. Accepts: 0 or “days” or “month”, 1 or “months” or “year”, 2 or “years” or “decade”, 3 or “decades” or “century”, and 4 or “centuries” or “millenium”. Useful for date-of-birth datepickers.

default

0

description

接受值:0,1,2,3,4分别对应days,months,years,decades,centuries

Optional style

style: string = ""

Additional CSS styles that will be rendered into an inline style attribute when the widget is rendered.

Optional textAlign

textAlign: LR = "left"

Optional tip

tip: string = ""

Optional title

title: string = ""

The string that will appear on top of the datepicker. If empty the title will be hidden.

Optional titleCls

titleCls: string

Optional titlePlace

titlePlace: "left" | "top" = "left"

Optional titleStyle

titleStyle: string

Optional titleTextPlace

titleTextPlace: LOC9 = "rm"

Optional titleWidth

titleWidth: string | number

Optional todayBtn

todayBtn: boolean = false

今日按钮 If true, displays a “Today” button at the bottom of the datepicker to select the current date.

Optional todayHighlight

todayHighlight: boolean = false

今日高亮 If true, highlights the current date.

Optional validateMode

validateMode: "tip" | { mode: "tip"; place?: LRTB } | { hideError: (this: DatePicker) => void; showError: (this: DatePicker, errorMsg: string) => void } | any = "tip"

Optional validators

validators: Array<ValidatorSetting> = []

Optional valueModel

valueModel: Klass<Model> | Model = Model

Optional width

width: string | number