DatePickerTheme
Customizes the appearance of DatePicker controls across the
app.
Properties
-
bgcolor(ColorValue | None) –Overrides the default background color of the surface in all descendant
-
cancel_button_style(ButtonStyle | None) –Overrides the default style of the cancel button of a
-
confirm_button_style(ButtonStyle | None) –Overrides the default style of the confirm (OK) button of a
-
day_bgcolor(ControlStateValue[ColorValue] | None) –Overrides the default color used to paint the background of the day labels in the
-
day_foreground_color(ControlStateValue[ColorValue] | None) –Overrides the default color used to paint the day labels in the grid of the
-
day_overlay_color(ControlStateValue[ColorValue] | None) –Overrides the default highlight color that's typically used to indicate that a day
-
day_shape(ControlStateValue[OutlinedBorder] | None) –Overrides the default shape used to paint the shape decoration of the day labels in
-
day_text_style(TextStyle | None) –Overrides the default text style used for each individual day label in the grid of
-
divider_color(ColorValue | None) –Overrides the default color used to paint the divider in all descendant
-
elevation(Number | None) –Overrides the default value of
DatePickerelevation. -
header_bgcolor(ColorValue | None) –Overrides the header's default background fill color.
-
header_foreground_color(ColorValue | None) –Overrides the header's default color used for text labels and icons.
-
header_headline_text_style(TextStyle | None) –Overrides the header's default headline text style.
-
header_help_text_style(TextStyle | None) –Overrides the header's default help text style.
-
range_picker_bgcolor(ColorValue | None) –Overrides the default background color for DateRangePicker (TBD).
-
range_picker_elevation(Number | None) –Overrides the default elevation of the full screen DateRangePicker (TBD).
-
range_picker_header_bgcolor(ColorValue | None) –Overrides the default background fill color for DateRangePicker (TBD).
-
range_picker_header_foreground_color(ColorValue | None) –Overrides the default color used for text labels and icons in the header of a full
-
range_picker_header_headline_text_style(TextStyle | None) –Overrides the default text style used for the headline text in the header of a
-
range_picker_header_help_text_style(TextStyle | None) –Overrides the default text style used for the help text of the header of a full
-
range_picker_shape(OutlinedBorder | None) –Overrides the default overall shape of a full screen DateRangePicker (TBD).
-
range_selection_bgcolor(ColorValue | None) –Overrides the default background color used to paint days selected between the
-
range_selection_overlay_color(ControlStateValue[ColorValue] | None) –Overrides the default highlight color that's typically used to indicate that a
-
shadow_color(ColorValue | None) –Overrides the default shadow color in all descendant
-
shape(OutlinedBorder | None) –Overrides the default value of
DatePickershape. -
today_bgcolor(ControlStateValue[ColorValue] | None) –Overrides the default color used to paint the background of the
-
today_border_side(BorderSide | None) –Overrides the border used to paint the
-
today_foreground_color(ControlStateValue[ColorValue] | None) –Overrides the default color used to paint the
-
weekday_text_style(TextStyle | None) –Overrides the default text style used for the row of weekday labels at the top of
-
year_bgcolor(ControlStateValue[ColorValue] | None) –Overrides the default color used to paint the background of the year labels in the
-
year_foreground_color(ControlStateValue[ColorValue] | None) –Overrides the default color used to paint the year labels in the year selector of
-
year_overlay_color(ControlStateValue[ColorValue] | None) –Overrides the default highlight color that's typically used to indicate that a year
-
year_text_style(TextStyle | None) –Overrides the default text style used to paint each of the year entries in the year
Properties#
bgcolor
#
bgcolor: ColorValue | None = None
Overrides the default background color of the surface in all descendant
DatePicker controls.
cancel_button_style
#
cancel_button_style: ButtonStyle | None = None
Overrides the default style of the cancel button of a
DatePicker.
confirm_button_style
#
confirm_button_style: ButtonStyle | None = None
Overrides the default style of the confirm (OK) button of a
DatePicker.
day_bgcolor
#
day_bgcolor: ControlStateValue[ColorValue] | None = None
Overrides the default color used to paint the background of the day labels in the
grid of the DatePicker.
day_foreground_color
#
day_foreground_color: (
ControlStateValue[ColorValue] | None
) = None
Overrides 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
DatePickerTheme.day_text_style.
day_overlay_color
#
day_overlay_color: ControlStateValue[ColorValue] | None = (
None
)
Overrides the default highlight color that's typically used to indicate that a day in the grid is focused, hovered, or pressed.
day_shape
#
day_shape: ControlStateValue[OutlinedBorder] | None = None
Overrides 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
DatePickerTheme.today_bgcolor is used to
paint the shape decoration of the day label and the value of
DatePickerTheme.today_border_side and
DatePickerTheme.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
DatePickerTheme.day_bgcolor is used to paint
the shape decoration of the day label.
day_text_style
#
day_text_style: TextStyle | None = None
Overrides the default text style used for each individual day label in the grid of
the DatePicker.
The color in
DatePickerTheme.day_text_style is not
used,
DatePickerTheme.day_foreground_color
is used instead.
divider_color
#
divider_color: ColorValue | None = None
Overrides the default color used to paint the divider in all descendant
DatePicker controls.
header_bgcolor
#
header_bgcolor: ColorValue | None = None
Overrides the header's default background fill color.
The DatePicker's header displays the currently selected date.
header_foreground_color
#
header_foreground_color: ColorValue | None = None
Overrides 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
DatePickerTheme.header_headline_text_style
and
DatePickerTheme.header_help_text_style.
header_headline_text_style
#
header_headline_text_style: TextStyle | None = None
Overrides the header's default headline text style.
The dialog's header displays the currently selected date.
The color of the
DatePickerTheme.header_headline_text_style
is not used,
DatePickerTheme.header_foreground_color
is used instead.
header_help_text_style
#
header_help_text_style: TextStyle | None = None
Overrides 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,
DatePickerTheme.header_foreground_color
is used instead.
range_picker_bgcolor
#
range_picker_bgcolor: ColorValue | None = None
Overrides the default background color for DateRangePicker (TBD).
range_picker_elevation
#
range_picker_elevation: Number | None = None
Overrides the default elevation of the full screen DateRangePicker (TBD).
range_picker_header_bgcolor
#
range_picker_header_bgcolor: ColorValue | None = None
Overrides the default background fill color for DateRangePicker (TBD).
The dialog's header displays the currently selected date range.
range_picker_header_foreground_color
#
range_picker_header_foreground_color: ColorValue | None = (
None
)
Overrides the default color used for text labels and icons in the header of a full screen DateRangePicker (TBD)
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.
range_picker_header_headline_text_style
#
range_picker_header_headline_text_style: (
TextStyle | None
) = None
Overrides the default text style used for the headline text in the header of a full screen DateRangePicker (TBD).
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_picker_header_help_text_style
#
range_picker_header_help_text_style: TextStyle | None = None
Overrides the default text style used for the help text of the header of a full screen DateRangePicker (TBD).
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_shape
#
range_picker_shape: OutlinedBorder | None = None
Overrides the default overall shape of a full screen DateRangePicker (TBD).
If elevation is greater than zero then a shadow is shown and the shadow's shape mirrors the shape of the dialog.
range_selection_bgcolor
#
range_selection_bgcolor: ColorValue | None = None
Overrides the default background color used to paint days selected between the start and end dates in a DateRangePicker (TBD).
range_selection_overlay_color
#
range_selection_overlay_color: (
ControlStateValue[ColorValue] | None
) = None
Overrides the default highlight color that's typically used to indicate that a date in the selected range of a DateRangePicker (TBD) is focused, hovered, or pressed.
shadow_color
#
shadow_color: ColorValue | None = None
Overrides the default shadow color in all descendant
DatePicker controls.
shape
#
shape: OutlinedBorder | None = None
Overrides 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.
today_bgcolor
#
today_bgcolor: ControlStateValue[ColorValue] | None = None
Overrides the default color used to paint the background of the
[DatePicker.current_date].[flet.DatePicker.current_date] label in the grid of the
DatePicker.
today_border_side
#
today_border_side: BorderSide | None = None
Overrides the border used to paint the
DatePicker.current_date label in the
grid of the DatePicker.
The border side's [BorderSide.color] is not used,
DatePickerTheme.today_foreground_color
is used instead.
today_foreground_color
#
today_foreground_color: (
ControlStateValue[ColorValue] | None
) = None
Overrides the default color used to paint the
DatePicker.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
DatePickerTheme.day_text_style.
weekday_text_style
#
weekday_text_style: TextStyle | None = None
Overrides the default text style used for the row of weekday labels at the top of
the DatePicker grid.
year_bgcolor
#
year_bgcolor: ControlStateValue[ColorValue] | None = None
Overrides the default color used to paint the background of the year labels in the
year selector of the of the DatePicker.
year_foreground_color
#
year_foreground_color: (
ControlStateValue[ColorValue] | None
) = None
Overrides 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
DatePickerTheme.year_text_style.
year_overlay_color
#
year_overlay_color: ControlStateValue[ColorValue] | None = (
None
)
Overrides the default highlight color that's typically used to indicate that a year in the year selector is focused, hovered, or pressed.
year_text_style
#
year_text_style: TextStyle | None = None
Overrides the default text style used to paint each of the year entries in the year
selector of the DatePicker.
The color of the
DatePickerTheme.year_text_style is not
used,
DatePickerTheme.year_foreground_color
is used instead.