Collaborne/paper-date-picker-item

Change Locale doesn't works

Closed this issue · 0 comments

How to change the locale?
As said in the doc, import your local from moment after paper-date-picker-item link :
`

<script src='../bower_components/moment/locale/fr.js'></script>`

issue : locale is not changed in date picker.

workaround :
Update file paper-date-picker-edit-dialog.html

  1. add "locale" property :
    <paper-date-picker id="datePicker" date="{{date}}" force-narrow locale="{{locale}}"></paper-date-picker>
  2. add "locale" Polymer property :
    Polymer({ is: 'paper-date-picker-edit-dialog', properties: { ... /** * locale to apply to picker */ locale: { type: String, value : function(){ return moment.locale();} }
    now, it works :-)

Can you update src code?

thanks