Skip to content

DatePickerTheme

Customizes the appearance of descendant DatePicker controls.

属性 ​

名称类型默认值说明
bgcolorOptional[ColorValue]NoneOverrides the default background color of the surface in all descendant DatePicker controls.
shadow_colorOptional[ColorValue]NoneOverrides the default shadow color in all descendant DatePicker controls.
divider_colorOptional[ColorValue]NoneOverrides the default color used to paint the divider in all descendant DatePicker controls.
header_bgcolorOptional[ColorValue]NoneOverrides the header's default background fill color. The DatePicker's header displays the currently selected date.
today_bgcolorOptional[ControlStateValue[ColorValue]]NoneOverrides the default color used to paint the background of the [DatePicker.current_date].[flet.DatePicker.current_date] label in the grid of the DatePicker.
day_bgcolorOptional[ControlStateValue[ColorValue]]NoneOverrides the default color used to paint the background of the day labels in the grid of the DatePicker.
day_overlay_colorOptional[ControlStateValue[ColorValue]]NoneOverrides the default highlight color that's typically used to indicate that a day in the grid is focused, hovered, or pressed.
day_foreground_colorOptional[ControlStateValue[ColorValue]]NoneOverrides the default color used to paint the day labels in the grid of the DatePicker. This will be used instead of the color provided in day_text_style.
elevationOptional[Number]NoneOverrides the default value of DatePicker elevation.
range_picker_elevationOptional[Number]NoneOverrides the default elevation of the full screen DateRangePicker.
day_text_styleOptional[TextStyle]NoneOverrides the default text style used for each individual day label in the grid of the DatePicker. The color in day_text_style is not used, day_foreground_color is used instead.
weekday_text_styleOptional[TextStyle]NoneOverrides the default text style used for the row of weekday labels at the top of the DatePicker grid.
year_text_styleOptional[TextStyle]NoneOverrides the default text style used to paint each of the year entries in the year selector of the DatePicker. The color of the year_text_style is not used, year_foreground_color is used instead.
shapeOptional[OutlinedBorder]NoneOverrides the default value of DatePicker shape. If elevation is greater than zero then a shadow is shown and the shadow's shape mirrors the shape of the dialog.
cancel_button_styleOptional[ButtonStyle]NoneOverrides the default style of the cancel button of a DatePicker.
confirm_button_styleOptional[ButtonStyle]NoneOverrides the default style of the confirm (OK) button of a DatePicker.
header_foreground_colorOptional[ColorValue]NoneOverrides the header's default color used for text labels and icons. The dialog's header displays the currently selected date. This is used instead of the color property of header_headline_text_style and header_help_text_style.
header_headline_text_styleOptional[TextStyle]NoneOverrides the header's default headline text style. The dialog's header displays the currently selected date. The color of the header_headline_text_style is not used, header_foreground_color is used instead.
header_help_text_styleOptional[TextStyle]NoneOverrides the header's default help text style. The help text (also referred to as "supporting text" in the Material spec) is usually a prompt to the user at the top of the header (i.e. 'Select date'). The color of the header_help_style is not used, header_foreground_color is used instead.
range_picker_bgcolorOptional[ColorValue]NoneOverrides the default background color for DateRangePicker.
range_picker_header_bgcolorOptional[ColorValue]NoneOverrides the default background fill color for DateRangePicker. The dialog's header displays the currently selected date range.
range_picker_header_foreground_colorOptional[ColorValue]NoneOverrides the default color used for text labels and icons in the header of a full screen DateRangePicker. The dialog's header displays the currently selected date range. This is used instead of any colors provided by range_picker_header_headline_text_style or range_picker_header_help_text_style.
today_foreground_colorOptional[ControlStateValue[ColorValue]]NoneOverrides the default color used to paint the current_date label in the grid of the dialog's CalendarDatePicker and the corresponding year in the dialog's YearPicker. This will be used instead of the color provided in day_text_style.
range_picker_shapeOptional[OutlinedBorder]NoneOverrides the default overall shape of a full screen DateRangePicker. If elevation is greater than zero then a shadow is shown and the shadow's shape mirrors the shape of the dialog.
range_picker_header_help_text_styleOptional[TextStyle]NoneOverrides the default text style used for the help text of the header of a full screen DateRangePicker. The help text (also referred to as "supporting text" in the Material spec) is usually a prompt to the user at the top of the header (i.e. 'Select date'). The color of the range_picker_header_help_text_style is not used, range_picker_header_foreground_color is used instead.
range_picker_header_headline_text_styleOptional[TextStyle]NoneOverrides the default text style used for the headline text in the header of a full screen DateRangePicker. The dialog's header displays the currently selected date range. The color of range_picker_header_headline_text_style is not used, range_picker_header_foreground_color is used instead.
range_selection_bgcolorOptional[ColorValue]NoneOverrides the default background color used to paint days selected between the start and end dates in a DateRangePicker.
range_selection_overlay_colorOptional[ControlStateValue[ColorValue]]NoneOverrides the default highlight color that's typically used to indicate that a date in the selected range of a DateRangePicker is focused, hovered, or pressed.
today_border_sideOptional[BorderSide]NoneOverrides the border used to paint the current_date label in the grid of the DatePicker. The border side's [BorderSide.color] is not used, today_foreground_color is used instead.
year_bgcolorOptional[ControlStateValue[ColorValue]]NoneOverrides the default color used to paint the background of the year labels in the year selector of the of the DatePicker.
year_foreground_colorOptional[ControlStateValue[ColorValue]]NoneOverrides the default color used to paint the year labels in the year selector of the date picker. This will be used instead of the color provided in year_text_style.
year_overlay_colorOptional[ControlStateValue[ColorValue]]NoneOverrides the default highlight color that's typically used to indicate that a year in the year selector is focused, hovered, or pressed.
day_shapeOptional[ControlStateValue[OutlinedBorder]]NoneOverrides the default shape used to paint the shape decoration of the day labels in the grid of the DatePicker. If the selected day is the current day, the provided shape with the value of today_bgcolor is used to paint the shape decoration of the day label and the value of today_border_side and today_foreground_color is used to paint the border. If the selected day is not the current day, the provided shape with the value of day_bgcolor is used to paint the shape decoration of the day label.

关注我,学习大模型、大数据、Python等热门技术。