Date Masking With Calendar
The Calendar component supports a rich date masking syntax that allows you to format the visible dates in a variety of different ways.
Date Mask Attributes
The following HTML attributes can be set to configure date masking at various levels within the component.
<ntb:datepicker>
- submitmask: The format of the date in the hidden input that is used when the Calendar is submitted as part of a form. By default, the mask is yyyy-MM-dd.
<ntb:dateinput>
- displaymask: The mask applied to the <ntb:dateinput> text input element. Defaults to MMM dd yyyy.
- editmask: The mask applied to the <ntb:dateinput> when the input is focussed. This can be used to make editing the input easier. Defaults to the value of the displaymask.
Mask Types
You can format the different parts of a date in a variety of ways, and then combine them together in any order you wish. For example, given the date Wednesday, January 30th, 2008, the various mask types would yield:
- yyyy - 2008
- yy - 08
- M - 1
- MM - 01
- MMM - January
- NNN - Jan
- d - 30
- dd - 30
- EE - Wednesday
- E - Wed
page_revision: 1, last_edited: 1224629615|%e %b %Y, %H:%M %Z (%O ago)