clrDate
Directive
To use the date picker, add the clrDate
directive to an
input
field. Then, place the input inside the
clr-date-container
container element.
type
to date
as it
increases readability of your code, helps with SEO, and keeps your HTML markup semantic. When the date picker is
enabled, this type
is overridden to text
to disable
the built-in date pickers that some desktop browsers provide.
The earliest and latest acceptable dates can also be set. Just like the native HTML5 date spec a
yyyy-mm-dd
string can be used in the value for min or max. If the max value isn't a
possible date then that the input has no max value. Similar for min values, if the string used is not a possible date
then the input will not have a min value.
Only dates inside the min/max range will be selectable for the input when there is a bound placed for the min or max attribute.