Date Styling

The Date element is a special input for collecting specific periods in time by specifying the day, month, and year. It allows the user to type the date in the input or click the Date icon to open a date picker.

This element can be broken down into several parts, which can be styled individually. For example, the label font, the input fill color, or date picker modal colors (that are set by default from the primary input color and can be overridden).

This element can be edited on both the Project Style Level and Element Style Level.

Styling options
Styling options
#OptionFunctionAvailable in Project or Element
1RootThis option enables you to set general properties that affect the Date element as a whole.
2LabelThe Label option allows you to control the style of the descriptive text above the Date Input box. For example, its font type, font size, and color.
3Shrink LabelYou can use the Shrink Label option to control the style of the elevated label when the input label is configured as floating.

The Shrink Label option is only available under the Standard, Filled, and Outlined variants on the project styling properties and may not be applied to the Classic and Fixed variants.
4InputThe Input option allows you to style the Input box and the text entered inside the Date field.
5Placeholder Insert filler content to occupy an element with possible content until the user replaces the placeholder with data.
6MessagesThis option allows you to style the text shown under the Date when the input text is found to be valid or invalid.

You can set the font for both messages and a separate color for the error and success messages. The colors set for errors or valid outcomes also affect the Input border.
7Modal HeaderThis option allows you to set the style of the header in the Date Picker window.

You can change the header’s font style, border, and fill color (which is set by default from the element’s primary color but can

be overridden using this option).
8Modal SelectionThe Modal Selection option enables you to modify the style of the selected date in the Date picker: its font, border, and fill.

Please note that the fill color of the selected day is taken by default from the element’s primary color but can be overridden here.
9Modal ButtonThis option allows you to modify the style of the OK and Cancel buttons in the Date Picker window, for example, their fill color, border, font, and padding.

The font color of the modal’s buttons is set by default from the input primary color. You can override the color here if you want.
10Date IconYou can use this option to change the Date icon’s color and width.

Changing the width will also change the height accordingly in the same proportion.
11Valid IconIndicate that the provided input has passed the validation process.
12Invalid IconIndicate that the provided input has not passed the validation process

1. Root

The Root option enables you to set general properties that affect the Date as a whole, such as primary color, element size, position, and alignment.

Root styling options
Root styling options
#OptionFunctionAvailable in Project or Element
1PrimaryThe Primary color given to the Date field affects its border color, as well as the colors in the date picker window (modal header fill color, modal selection date fill and modal buttons font).
2PositionYou can use this option to change the Date’s location in the content area on the x and y-axis (left/right/top/bottom).

Position also allows you to make the Date float over its parent container or over the entire page.

“Float over Parent” allows you to set the location of the Date within the box containing it, e.g. container or strip.

“Float over Page” allows you to set the location of the Date inside of the entire page (and have it stay in the same location even when the user is scrolling in it).
3SizeThis option allows you to change the width and height of the Date element.
4AlignmentYou can set the Date element to a vertical or horizontal position in relation to its container (left/center/right/top/middle/bottom).

The Alignment option also allows you to set the position of a few elements in relation to each other.
5User CSSCascading Style Sheets (CSS) allows the user to apply styles on the Date element with CSS code.

Note: For Project styling, CSS is accessed via the Tools menu, which you can read about in our Style Elements Using User CSS article.
6Input VariantThis option allows you to choose the general look of the input from five existing variants: Standard, Filled, Outlined, Fixed, or Classic.

Except for the Fixed and Classic options, the labels in all variants can be set as Floating.

2. Label

The Label option allows you to control the style of the descriptive text above the Date box. For example, its font type, font size, and color.

Label styling options
Label styling options
#OptionFunctionAvailable in Project or Element
1FontThe Font enables you to change the typography style, for instance, font family, weight, color, and size.
2MarginThis option allows you to set the outer space between the label and adjacent element parts.
3AsteriskThis option lets you set the style of the asterisk sign (*) that appears next to the label when the element is mandatory.

3. Shrink Label

You can use the Shrink Label to control the style of the elevated label when the input label is configured as floating.

The Shrink Label option is available under the Standard, Filled, and Outlined variants on the project styling properties and is not available with Classic and Fixed variants.

Shrink Label styling options
Shrink Label styling options
#OptionFunctionAvailable in Project or Element
1FontThis option enables you to turn on the Floating Label functionality (which is turned off by default), by switching off the “Always shrunk” checkbox.

It then enables you to change the typography style of the floating label (for instance, font family, weight, color, and size) and set the Top and Left offset for the floating label.
2MarginThis option allows you to set the outer space between the Shrink Label and adjacent element parts.

4. Input

The Input option allows you to style the Input box, the text entered by the user, the date icon, the prefix text, and the icon that could also be shown.

Input styling options
Input styling options
#OptionFunctionAvailable in Project or Element
1Input FontYou can use the Input Font to change the typography style, for instance, font family, color, and size.
2Prefix Text FontYou can use this option to style the static text that appears before the user input text.
3Prefix IconThe Prefix Icon allows you to style the static icon that appears before the user input text.
4PaddingThe padding option allows you to control the space between the date field input border and the content inside of it.
5ShadowYou can add single or multiple shadow layers to the outer contour of the date field input.

5. Placeholder

Placeholder styling options
Placeholder styling options
#OptionFunctionAvailable in Project or Element
1FontThis option allows you to style the text shown under the Date element when the date is valid or invalid.

You can set the font for both messages and a separate color for the success and error messages. These colors will also be applied to the input border.

6. Messages

This option allows you to style the text shown under the Date input when the input text is valid or invalid.

Messages styling option
Messages styling option
#OptionFunctionAvailable in Project or Element
1FontThis option allows you to style the texts shown under the Date element when the date is valid or invalid.

You can set the font for both messages and a separate color for the success and error messages. These colors will also be applied to the input border.
2PaddingThe padding option allows you to control the space between the message and the content inside of it.

7. Modal Header

This option allows you to modify the style of the date picker modal header: its font type, border, and fill (which is taken by default from the element’s primary color but can be overridden here).

Modal Header styling option
Modal Header styling option
#OptionFunctionAvailable in Project or Element
1FillThe Fill option allows you to set the background color of the Date Picker window header.

The header’s fill color is taken by default from the element’s primary color but can also be overridden here.
2FontThis option allows you to change the typography style of the text in the date picker header, for instance, font family, weight, color, and size.
3BorderThe Border option allows you to style the contour of the header in the Date Picker window: make the border visible or invisible, change its width, color, corner radius, and more.

The border can be styled as a whole or separated into top, bottom, left, and right border lines.

8. Modal Selection

You can use this option to modify the date displayed on the Date Picker window.

Modal Selection styling options
Modal Selection styling options
#OptionFunctionAvailable in Project or Element
1FillThis option allows you to set a background color to the selected date in the Date Picker window.

The fill color is taken by default from the element’s primary color, but you can also override it from here.
2FontThis option allows you to change the typography style of the selected date, for instance, font family, weight, color, and size.

9. Modal Button

This option allows you to modify the OK and Cancel buttons in the Date Picker window.

Modal Button styling options
Modal Button styling options
#OptionFunctionAvailable in Project or Element
1FillThe Fill option allows you to set a background color to the OK and Cancel buttons in the Date Picker window.

The color can be set by selecting from a color pallet or providing a HEX color code.
2FontYou can use the Font option to change the typography style of the buttons, for instance, font family, weight, color, and size.

The button font color is taken by default from the element’s primary color, but it can be overridden here
3BorderThe Border option allows you to style the contour of the header in the Date Picker window: make the border visible or invisible, change its width, color, corner radius, and more.

The border can be styled as a whole or separated into top, bottom, left, and right border lines.
4PaddingYou can control the padding space of the OK and Cancel buttons in the Date Picker window to make them larger or smaller.

The padding could be set on the Top/Bottom to control the height of the button and also on the Left/Right to control the width.

10. Date Icon

You can use this option to change the Date icon’s color and width.

Changing the width will also change the height accordingly in the same proportion.

Date Icon styling options
Date Icon styling options
#OptionFunctionAvailable in Project or Element
1ColorThe Color option allows you to set the icon’s color. The color can be set by selection from a color pallet or by specifying a HEX color code.
2StrokeThis option refers to the outer contour of an icon. It allows you to make the icon’s border visible or invisible and change its weight and color.
3SizeThis option allows you to change the width and height of an icon.

Since the Icon has a fixed ratio, Changing its width will automatically adjust its height. And vice versa.

11. Valid Icon

Indicate that the provided input has passed the validation process.

Valid Icon styling options
Valid Icon styling options
#OptionFunctionAvailable in Project or Element
1ColorThe Color option allows you to set the icon’s color. The color can be set by selection from a color pallet or by specifying a HEX color code.
2StrokeThis option refers to the outer contour of an icon. It allows you to make the icon’s border visible or invisible and change its weight and color.
3SizeThis option allows you to change the width and height of an icon.

Since the Icon has a fixed ratio, Changing its width will automatically adjust its height. And vice versa.

12. Invalid Icon

Indicate that the provided input has not passed the validation process.

Invalid Icon styling options
Invalid Icon styling options
#OptionFunctionAvailable in Project or Element
1ColorThe Color option allows you to set the icon’s color. The color can be set by selection from a color pallet or by specifying a HEX color code.
2StrokeThis option refers to the outer contour of an icon. It allows you to make the icon’s border visible or invisible and change its weight and color.
3SizeThis option allows you to change the width and height of an icon.

Since the Icon has a fixed ratio, changing its width will automatically adjust its height. And vice versa.

Hidden Title

Need more help?