-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
BCalendar and BFormDatepicker should have date format option #4797
BCalendar and BFormDatepicker should have date format option #4797
Comments
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 <troymore@nbnet.nb.ca> Co-authored-by: Jacob Müller <jacob.mueller.elz@gmail.com>
@tmorehouse I am using v2.10.0 and dateStyle formatter suddenly stopped working. Kept getting this error (Invalid option : dateStyle) |
@clarkestephen: This may be due to a browser upgrade. Try in ~Chrome 83. |
How do I change MM-DD-YYYY to YYYY-DD-MM? |
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).
Some suggestions:
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.
Additional context
The text was updated successfully, but these errors were encountered: