Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change language dynamically #1251

Open
Lechucico opened this issue Dec 19, 2023 · 0 comments
Open

Change language dynamically #1251

Lechucico opened this issue Dec 19, 2023 · 0 comments

Comments

@Lechucico
Copy link

I'm trying to change language dynamically, but nothing changes after creating a new instance, here is the code:

// Default english
var datePicker = $('.datepicker').pickadate({
  today: null,
  clear: null,
  formatSubmit: 'dd/mm/yyyy',            
})

After changing language, I create a new instance with the new translations, but the same English modal opens:

var datePicker = $('.datepicker').pickadate({
  today: null,
  clear: null,
  formatSubmit: 'dd/mm/yyyy',    
  monthsFull: ['Janvier', 'Février', 'Mars', 'Avril', 'Mai', 'Juin', 'Juillet', 'Août', 'Septembre', 'Octobre', 'Novembre', 'Décembre'],
  weekdaysShort: ['Dim', 'Lun', 'Mar', 'Mer', 'Jeu', 'Ven', 'Sam'],
  formatSubmit: 'yyyy/mm/dd'
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant