Renders a date/time picker in a dropdown container.
A stand-alone DateTimePicker widget that makes it easy to select a date/time, or increment by week, month, and/or year.
Dates attributes passed in the `RFC 3339` format: Renders date/time picker element. Format supported by this component are:-
Format | Description |
#dd | Display day in two digits format |
#d | Try to display day in one digit format, if cannot use 2 digit format |
#MM | Display month in two digits format |
#M | Try to display month in one digits format, if cannot use 2 digit format |
#yyyy | Display year in four digits format |
#yy | Display the last two digits of the yaer |
#y | Display the last digits of the year |
It is possible to customize the user-visible formatting with either the formatLength or displayFormat attributes. The value sent to the server is typically a locale-independent value in a hidden field as defined by the name attribute. RFC3339 representation is used by default, but other options are available with saveFormat
Examples Example 1: <s:datetimepicker name="order.date" label="Order Date" /> Example 2: <s:datetimepicker name="delivery.date" label="Delivery Date" format="#yyyy-#MM-#dd" />
The css could be changed by using the following :-
<s:datetimepicker name="birthday" label="Birthday" templateCss="...." />