Date Time Picker CSS API Reference

All Common CSS variables:

  • --smart-primary: The theme primary color.
  • --smart-primary-color: Text color on top of a primary background.
  • --smart-secondary: The theme secondary color.
  • --smart-secondary-color: Text color on top of a secondary background.
  • --smart-error: The theme error color.
  • --smart-error-color: Text color on top of a error background.
  • --smart-success: The theme success color.
  • --smart-success-color: Text color on top of a success background.
  • --smart-background: The theme background color. The background color appears behind scrollable content.
  • --smart-background-color: Text color on top of a background background.
  • --smart-surface: The theme surface color. Surface colors affect surfaces of components, such as cards, sheets, and menus.
  • --smart-surface-color: Text color on top of a surface surface.
  • --smart-disabled: The theme primary color in disabled state.
  • --smart-disabled-color: Text color on top of a theme background in disabled state.
  • --smart-font-size: Theme font-size.
  • --smart-font-family: Theme font-family.
  • --smart-border-width: Theme border-width.
  • --smart-border-radius: Theme border-radius.
  • --smart-border: The theme border settings.
  • --smart-outline: The theme border color.
  • --smart-arrow-size: Font size of the arrow elements.
  • --smart-editor-selection: Background color of the selected text.
  • --smart-editor-selection-color: Color of the selected text.
  • --smart-alternation-index0-color: Alternation color for index0.
  • --smart-alternation-index0-border-color: Alternation border color for index0.
  • --smart-alternation-index0-background: Alternation background color for index0.
  • --smart-alternation-index1-color: Alternation color for index1.
  • --smart-alternation-index1-border-color: Alternation border color for index1.
  • --smart-alternation-index1-background: Alternation background color for index1.
  • --smart-alternation-index2-color: Alternation color for index2.
  • --smart-alternation-index2-border-color: Alternation border color for index2.
  • --smart-alternation-index2-background: Alternation background color for index2.
  • --smart-tick-color: Default tick color for smartTank, smartSlider and smartGauge.
  • --smart-tick-label-color: Default tick label color for smartTank, smartSlider and smartGauge.
  • --smart-box-height: Default height for Dialog, Gauge, Accordion, Tabs, Tree, Array.
  • --smart-box-width: Default width for Dialog, Gauge, Accordion, Tabs, Tree, Array.
  • --smart-bar-height: Default height for headers and footers.
  • --smart-bar-width: Default width for headers and footers.
  • --smart-editor-height: Default height for editors.
  • --smart-editor-width: Default width for editors.
  • --smart-editor-drop-down-width: Default width for editors drop-down.
  • --smart-editor-drop-down-height: Default height for editors drop-down.
  • --smart-editor-label-padding: Default padding for inputs.
  • --smart-editor-addon-width: Default width for spin buttons, dropdown buttons.

Specific CSS variables for Date Time Picker styling:

  • --smart-date-time-picker-default-width: smartDateTimePicker default width.
  • --smart-date-time-picker-default-height: smartDateTimePicker default height.
  • --smart-date-time-picker-spin-buttons-width: smartDateTimePicker spin buttons width.
  • --smart-date-time-picker-drop-down-width: smartDateTimePicker drop down width.
  • --smart-date-time-picker-drop-down-height: smartDateTimePicker drop down height.
  • --smart-date-time-picker-font-size: Defines timepicker's font size.
  • --smart-date-time-picker-font-family: Defines timepicker's font family.
  • --smart-date-time-picker-border-top-right-radius: Defines element's top-right border radius.
  • --smart-date-time-picker-border-top-left-radius: Defines element's top-left border radius.
  • --smart-date-time-picker-border-bottom-left-radius: Defines element's bottom-left border radius.
  • --smart-date-time-picker-border-bottom-right-radius: Defines element's bottom-right border radius.
  • --smart-date-time-picker-border-width: Defines element's border width.
  • --smart-date-time-picker-selection: Defines the background color of the selected text in date time picker.
  • --smart-date-time-picker-selection-color: Defines the color of the selected text in date time picker.
  • --smart-date-time-picker-header-background: Defines elements header background color.
  • --smart-date-time-picker-header-border: Defines elements header border.
  • --smart-date-time-picker-header-color: Defines elements header color.
  • --smart-date-time-picker-header-opacity: Defines elements headers opacity.
  • --smart-date-time-picker-header-background-active: Defines elements header background color in active state.
  • --smart-date-time-picker-header-border-active: Defines elements header border color in active state.
  • --smart-date-time-picker-header-color-active: Defines elements header color in active state.
  • --smart-date-time-picker-header-opacity-active: Defines elements header opacity in active state.
  • --smart-date-time-picker-background: Defines elements background color.
  • --smart-date-time-picker-border: Defines elements border color.
  • --smart-date-time-picker-color: Defines elements color.
  • --smart-date-time-picker-background-hover: Defines background color when element is hovered.
  • --smart-date-time-picker-border-hover: Defines the border when element is hovered./li>
  • --smart-date-time-picker-color-hover: Defines the color when element is hovered.
  • --smart-date-time-picker-background-active: Defines background color when element is active.
  • --smart-date-time-picker-border-active: Defines border color when element is active.
  • --smart-date-time-picker-color-active: Defines color when element is active.
  • --smart-date-time-picker-background-focus: Defines background color when element is focused.
  • --smart-date-time-picker-border-focus: Defines border color when element is focused.
  • --smart-date-time-picker-color-focus: Defines the color when element is focused.
  • --smart-label-height: smartDateTimePicker label and hint height.

The following CSS selectors can be used to style DateTimePicker:

  • smart-date-time-picker - applied to the whole DateTimePicker element. Can be used for setting width, height and color- and font-related CSS properties.
    • .smart-container - the container that holds the internals of the element.
      • .smart-label - the label of the element.
      • .smart-content - a container for the internal contents of the element.
        • .smart-input .smart-date-time-input - an input element for the datetime string.
        • .smart-spin-buttons-container - applied to the spin buttons container.
          • .smart-spin-button - the common class for the spin buttons.
            • .smart-arrow .smart-arrow-up - applied to the arrow of the increment spin button.
      • .smart-spin-button - the common class for the spin buttons. * .smart-arrow .smart-arrow-down - applied to the arrow of the decrement spin button.
        • .smart-drop-down-button .smart-calendar-button - applied to the calendar button.
        • .smart-drop-down .smart-date-time-drop-down - a container for the drop down elements.
          • .smart-drop-down-header - a container for the drop down calendar.
        • DIV element - a DIV element used to change to Date selection view.
        • DIV element - a DIV element used to change to Time selection view.
          • .smart-drop-down-content - a container for the drop down calendar.
            • smart-calendar - applied to the calendar dropdown. It is an instance of smart-calendar and its inner elements can be styled as specified in the smartCalendar CSS API.
        • .smart-hint - the hint of the element

Demo

<style>
        #datetimepicker{
                --smart-color: #ccc;
                --smart-font-size: 20px;
        }
</style>