-
Notifications
You must be signed in to change notification settings - Fork 157
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
format data-date #135
Comments
Sorry if I don't understand correctly. Date picker parses given date strings using the format specified with the Or, you may be able to create a custom parser that supports both ISO and local date formats, like this: var datepicker = new Datepicker(elem, {
format: {
toValue: (date) => {
const format = typeof date === 'string' && date.match(/^\d{4}(-\d\d){2}$/)
? 'yyyy-mm-dd'
: 'dd/mm/yyyy';
return Datepicker.parseDate(date, format, 'fr');
},
toDisplay: date => Datepicker.formatDate(date, 'dd/mm/yyyy', 'fr'),
}
}; |
I can't do this on typescript given the |
@JoshuaAlzate, can you elaborate on what you are trying to do? |
Hi et thank you for this work.
How i can select the data-date correctly ? i have to parse it with new date or it is possible to change it with new format YYYY-MM-DD in the parameter ?
The text was updated successfully, but these errors were encountered: