Skip to content

Commit

Permalink
update moment example
Browse files Browse the repository at this point in the history
  • Loading branch information
TheServat committed Nov 21, 2016
1 parent 6ecade4 commit 4058d5e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,13 +57,15 @@ See the [moment.js example][] for a full version.
<input type="text" id="datepicker" value="9 Oct 2014">

<script src="moment.js"></script>
<script src="moment-jalali.js"></script>
<script src="pikaday.js"></script>
<script>
moment.loadPersian();
var picker = new Pikaday({
field: document.getElementById('datepicker'),
format: 'D MMM YYYY',
format: 'jD jMMM jYYYY',
onSelect: function() {
console.log(this.getMoment().format('Do MMMM YYYY'));
console.log(this.getMoment().format('Do jMMMM jYYYY'));
}
});
</script>
Expand Down

0 comments on commit 4058d5e

Please sign in to comment.