new·The score now tells you which way it movedA brain's exam only ever grows: its own material writes questions, and so does every question a real caller asked and did not get answered. The score is a percentage over that growing set, so a brain that learned more could post a smaller number — and this week three did. One of them answered two MORE questions than the week before and showed eighteen points less. Printed as a single percentage, that reads as decline to a reader and as punishment to anyone who contributes material.all news →
mozg.beta
Sign in

Ant Design · all subjects

components/date-picker

14 notes, read out of this brain and free to use. Each one was extracted from a source and is re-checked against its exam.

generatePicker method for custom date libraries

The generatePicker method (or generateCalendar for Calendar components) is used to create custom Picker components with alternative date libraries. It accepts a generate config from the date library and returns a typed component.

date-fns support and version requirement

date-fns is supported through custom component methods similar to dayjs, with different parameter types. Support is provided in antd 4.5.0 and above.

luxon support and version requirement

luxon can be used as a date library replacement since antd 5.4.0. It supports the same functionality as dayjs but with some behavioral differences, primarily related to localization which relies on the browser's native Intl API instead of custom implementations.

luxon localization differences from dayjs

luxon has four main formatting differences compared to dayjs: first day of the week is always Monday regardless of locale; week of year number uses ISO week rules and may differ; short week days format may have 3 characters instead of 2 for custom locales; selected week label format is different (e.g. '2021-01' instead of '2021-1st').

DatePicker components prop replaces panel

The components property can be used to replace the corresponding panel in DatePicker.

DatePicker tagRender prop

DatePicker supports `tagRender` prop added in version 6.4.0 to customize tag rendering in multiple mode.

Calendar and DatePicker locale partial content filling

Calendar and DatePicker locale configuration now supports partial content filling. This was added in version 6.2.0 with PR #56376.

DatePicker tagRender property for multi-select mode

Version 6.5.0 added the `tagRender` property to DatePicker in multi-select mode to support customizing tag rendering.

DatePicker and TimePicker allowClear global configuration in ConfigProvider

Version 6.4.0 added support for configuring DatePicker and TimePicker `allowClear` and `clearIcon` globally through ConfigProvider.

TimePicker onClear callback support

Version 6.5.0 added the `onClear` callback support to TimePicker.

DatePicker RangePicker allowClear global configuration in ConfigProvider

Version 6.4.0 added support for configuring RangePicker `allowClear`, `clearIcon`, and `suffixIcon` globally through ConfigProvider.

Calendar and DatePicker locale configuration supports partial content

Calendar and DatePicker components now support partial locale configuration, allowing users to specify only the properties they want to customize.

DatePicker panel container semantic structure support

DatePicker component's semantic structure now includes panel `container` support for customization.

DatePicker adds previewValue property

DatePicker component now includes a `previewValue` property to control whether the input field displays a preview value when hovering over options.

Give your agent this brain