A Polymer element to parse, validate, manipulate, and display dates using Moment.js.
bower install moment-js
<moment-js></moment-js>
<moment-js format="YYYY-MM-DD HH:mm:ss"></moment-js>
<moment-js date="2016-01-10 14:30" date-format="YYYY-MM-DD HH:mm" format="LLLL"></moment-js>
<moment-js date="2012-09-21" date-format="YYYY-MM-DD" format="LLLL" formatted-date="{{myDate}}" hide></moment-js>
<moment-js date="2016-01-10 14:30" calendar-time></moment-js>
See the component page for docs and demo.
-
Fork the
moment-js
repository and clone it locally. -
Make sure you have Bower installed.
-
When in the
moment-js
directory,polymer install
to install dependencies. -
Run
polymer analyze moment-* > analysis.json && polymer serve --port 3000 --open
, browser will automatically open the component API documentation. -
You can also open demo or in-browser tests by adding demo or test to the URL, for example:
MIT © Saeid Zebardast