1.0.0-beta.1 • Published 7 years ago

ion-datetime-picker-converter-iso-string v1.0.0-beta.1

Weekly downloads
1
License
MIT
Repository
github
Last release
7 years ago

ion-datetime-picker-converter-iso-string

GitHub version npm version Bower version Ionic version License

Model converter from/to ISO string - for ion-datetime-picker

Installation

  1. 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
  2. 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 formatsSupported time formatsSupported time zone formats
YYYY-MM-DDHH:MM:SS.sss (fraction is not used)+HH:MM
YYYY-MMHH:MM:SS-HH:MM
YYYYHH:MM+HHMM
MM-DDHH-HHMM
DD (only if time is present)Z