ion-datetime-picker-converter-iso-string
v1.0.0-beta.1
Published
Model converter from/to ISO string for ion-datetime-picker
Downloads
3
Readme
ion-datetime-picker-converter-iso-string
Model converter from/to ISO string - for ion-datetime-picker
Installation
Use bower or npm to install this module:
bower install ion-datetime-picker-converter-iso-string --save
npm install ion-datetime-picker ion-datetime-picker-converter-iso-string --save
Import the javascript file into your HTML file (or use webpack):
<script src="lib/ion-datetime-picker-converter-iso-string/dist/index.js"></script>
Usage
Use iso-string
as a value of converter
attribute when you define your picker.
<ion-datetime-picker converter="iso-string" ...></ion-datetime-picker>
See ion-datetime-picker README for more info.
Supported model formats
Model value must be formatted according to ISO 8601 standard, using calendar date and/or time. If both date and time are present, they must be separated by T
or a whitespace.
If the year is present, it's length must be at least 4 numbers, with an optional sign.
Time can be followed by time zone designator, but it is not used.
| Supported date formats || Supported time formats || Supported time zone formats |
| ---------------------------- | -- | --------------------------------- | -- | ------------------------- |
| YYYY-MM-DD
|| HH:MM:SS.sss
(fraction is not used) || +HH:MM
|
| YYYY-MM
|| HH:MM:SS
|| -HH:MM
|
| YYYY
|| HH:MM
|| +HHMM
|
| MM-DD
|| HH
|| -HHMM
|
| DD
(only if time is present) || || Z
|