6
6
As a form control wrapper component for the [ ` <b-calendar> ` ] ( /docs/components/calendar ) component,
7
7
it provides additional validation state presentation and a compact interface. Native HTML5 date
8
8
inputs vary in presentation, accessibility, and in some instances are not supported by all browsers.
9
- ` <b-form-datepicker> ` provides a consistent and accessible interface across all browser platforms and
10
- devices.
9
+ ` <b-form-datepicker> ` provides a consistent and accessible interface across all browser platforms
10
+ and devices.
11
11
12
12
The ` <b-form-datepicker> ` component was introduced in BootstrapVue release ` v2.5.0 ` .
13
13
@@ -41,8 +41,8 @@ The `<b-form-datepicker>` component was introduced in BootstrapVue release `v2.5
41
41
42
42
By default, ` <b-form-datepicker> ` returns dates as a string in the ` YYYY-MM-DD ` format, which is the
43
43
same format returned by native browser ` <input type="date"> ` controls. You can have
44
- ` <b-form-datepicker> ` return a ` Date ` object (with no time portion) as the ` v-model ` value instead by
45
- setting the ` value-as-date ` prop.
44
+ ` <b-form-datepicker> ` return a ` Date ` object (with no time portion) as the ` v-model ` value instead
45
+ by setting the ` value-as-date ` prop.
46
46
47
47
If no date is selected, ` <b-form-datepicker> ` returns an empty string ` '' ` , or returns ` null ` if the
48
48
` value-as-date ` prop is set.
@@ -51,9 +51,9 @@ Note that when `value-as-date` prop is set, the returned `Date` object will be i
51
51
default timezone.
52
52
53
53
If ` <b-form-datepicker> ` has a value set for the ` name ` prop, a hidden input will be created which
54
- will have its name attribute set to the value of the ` name ` prop, and the value attribute will be set
55
- to the selected date as a ` YYYY-MM-DD ` string. This will allow the ` <b-form-datepicker> ` selected
56
- value to be submitted via native browser form submission.
54
+ will have its name attribute set to the value of the ` name ` prop, and the value attribute will be
55
+ set to the selected date as a ` YYYY-MM-DD ` string. This will allow the ` <b-form-datepicker> `
56
+ selected value to be submitted via native browser form submission.
57
57
58
58
## Disabled and readonly states
59
59
@@ -186,9 +186,10 @@ Note the `min` and `max` date constraints are evaluated first, before `date-disa
186
186
187
187
## Validation states
188
188
189
- ` <b-form-datepicker> ` supports invalid and valid styling via the boolean ` state ` prop. Setting ` state `
190
- to boolean ` false ` will style the input as invalid, while setting it to boolean ` true ` will style it
191
- as valid. Setting ` state ` to ` null ` will not show any validation state styling (the default).
189
+ ` <b-form-datepicker> ` supports invalid and valid styling via the boolean ` state ` prop. Setting
190
+ ` state ` to boolean ` false ` will style the input as invalid, while setting it to boolean ` true ` will
191
+ style it as valid. Setting ` state ` to ` null ` will not show any validation state styling (the
192
+ default).
192
193
193
194
``` html
194
195
<template >
@@ -308,9 +309,9 @@ except for labels applied to elements of the calendar control (aria-labels, sele
308
309
help text). You must provide your own translations for these labels. The available locales will be
309
310
browser dependant (not all browsers support all locales)
310
311
311
- By default ` <b-form-datepicker> ` will use the browser's default locale, but you can specify the locale
312
- (or locales) to use via the ` locale ` prop. The prop accepts either a single locale string, or an array
313
- of locale strings (listed in order of preferred locale).
312
+ By default ` <b-form-datepicker> ` will use the browser's default locale, but you can specify the
313
+ locale (or locales) to use via the ` locale ` prop. The prop accepts either a single locale string, or
314
+ an array of locale strings (listed in order of preferred locale).
314
315
315
316
The calendar starts the week on Sunday. This can be changed by setting the ` start-weekday ` prop to a
316
317
number in the range of ` 0 ` to ` 6 ` where ` 0 ` represents Sunday, ` 1 ` for Monday, up to ` 6 ` for
@@ -431,8 +432,8 @@ details.
431
432
` <b-form-datepicker> ` is based upon the components [ ` <b-calendar> ` ] ( /docs/components/calendar ) and
432
433
[ ` <b-dropdown> ` ] ( /docs/components/dropdown ) .
433
434
434
- ` <b-form-datepicker> ` uses Bootstrap's margin, padding, border, and flex utility classes, along
435
- with button (` btn-* ` ) classes, and the ` form-control* ` (plus validation) classes.
435
+ ` <b-form-datepicker> ` uses Bootstrap's margin, padding, border, and flex utility classes, along with
436
+ button (` btn-* ` ) classes, and the ` form-control* ` (plus validation) classes.
436
437
437
438
BootstrapVue's Custom SCSS/CSS is also required for proper styling of the date picker and calendar.
438
439
0 commit comments