BCalendar and BFormDatepicker should have date format option #4797
Is your feature request related to a problem? Please describe...
Currently, BCalendar shows formated date variant. It is not possible to customize it
Describe the solution you'd like
It should be possible to change format (or at least use BCalendar's context event formats - YMD, Date or Formated).
Describe alternatives you've considered
Previously I used HTML native date inputs, then I switched to tempus-dominus (using moment.js). Both options allows custom formatting. It would be nice to have it in bootstrap-vue, too.
The text was updated successfully, but these errors were encountered:
One thing to keep in mind, is that the formatted date is also an
However, we might be able to provide an optional formatter-fn prop to show a different value (and
The other option, might be to allow passing of optional options to control
There are options in Intl.DateTimeFormat for controlling the style of each part of the formatted date (we could add a prop that accepts an object with the following properties/values)
And the following, which is not supported on all browsers (i.e. Edge, IE 11, Firefox, Safari):
This is basically a shortcut the the above settings.
…ent displayed date format (closes #4797) (#4835) * feat(b-calendar): made date format to be configurable * Added new prop `formatLong` that defaults to current layout * Allows for better control on display (e.g. in combination with layouts defined in other components like vue-i18n) * feat(b-form-datepicker): Added format option for display of formatted date string * docs(b-calendar): Updated prop list * docs(b-form-datepicker): Updated prop list * Fixed prop default value * fix(b-form-datepicker): prop default value * docs(b-calendar): change prop name and referenced default format * docs(b-form-datepicker): change prop name and referenced default format * fix(b-calendar): rename prop and enforce gregorian calendar * fix(b-form-datepicker): rename prop in component and in forwarding to b-calendar * chore(b-calendar): file formating * docs(b-calendar): add styling subsection on new prop * Fixed referenced filename * docs(b-form-datepicker): add styling subsection on new prop * Removed fixed calendar type from prop dateFormatOptions * Removed fixed calendar type from prop dateFormatOptions * Update package.json * Update package.json * Update README.md * Update README.md * Update calendar.js * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Minor tweaks * Enhance docs Co-authored-by: Troy Morehouse <firstname.lastname@example.org> Co-authored-by: Jacob Müller <email@example.com>