Closed huffSamuel closed 3 years ago
I added this kind of feature to the component. Install newest version of the component from npm (0.11.5).
In the dateFormat option you can define ordinal dates (d##) for example
dateFormat: 'd## of mmm yyyy'
Works perfectly. Thank you!
Description
I'm attempting to have the datepicker display the date ordinal as a day of the month rather than the entire date, for instance "3rd of the month" or "16th of the month". In the
dateChanged
callback I calculate the ordinal, create a new dateFormat, and copy the current options and reassign with the new date format. Sometimes this date format is respected immediately, sometimes the format lags one selection behind the current date.Steps to Reproduce
See my source code here. Snippets below:
home.page.ts
home.page.html
I can more reliably set the ordinal by updating the options, then updating the bound model in a
setTimeout
, but that isn't always effective.Expected Results