@@ -48,10 +48,6 @@ const propsMixin = {
48
48
type : Boolean ,
49
49
default : false
50
50
} ,
51
- showSeconds : {
52
- type : Boolean ,
53
- default : false
54
- } ,
55
51
required : {
56
52
// If true adds the `aria-required` attribute
57
53
type : Boolean ,
@@ -70,14 +66,31 @@ const propsMixin = {
70
66
type : Boolean ,
71
67
default : null
72
68
} ,
73
- hideHeader : {
69
+ hour12 : {
70
+ // Tri-state prop: `true` => 12 hour, `false` => 24 hour, `null` => auto
74
71
type : Boolean ,
75
- default : false
72
+ default : null
76
73
} ,
77
74
locale : {
78
75
type : [ String , Array ] ,
79
76
default : null
80
77
} ,
78
+ showSeconds : {
79
+ type : Boolean ,
80
+ default : false
81
+ } ,
82
+ hideHeader : {
83
+ type : Boolean ,
84
+ default : false
85
+ } ,
86
+ secondsStep : {
87
+ type : [ Number , String ] ,
88
+ default : 1
89
+ } ,
90
+ minutesStep : {
91
+ type : [ Number , String ] ,
92
+ default : 1
93
+ } ,
81
94
nowButton : {
82
95
type : Boolean ,
83
96
default : false
@@ -108,13 +121,46 @@ const propsMixin = {
108
121
} ,
109
122
labelCloseButton : {
110
123
type : String ,
111
- default : ( ) => getComponentConfig ( NAME , 'labelCloseButton' ) || 'Close'
124
+ default : ( ) => getComponentConfig ( NAME , 'labelCloseButton' )
112
125
} ,
113
126
closeButtonVariant : {
114
127
type : String ,
115
128
default : 'outline-secondary'
116
129
} ,
117
130
// Labels
131
+ // These fallback to BTime values
132
+ labelNoTime : {
133
+ type : String ,
134
+ default : ( ) => getConfigFallback ( 'labelNoTime' )
135
+ } ,
136
+ labelSelected : {
137
+ type : String ,
138
+ default : ( ) => getConfigFallback ( 'labelSelected' )
139
+ } ,
140
+ labelHours : {
141
+ type : String ,
142
+ default : ( ) => getConfigFallback ( 'labelHours' )
143
+ } ,
144
+ labelMinutes : {
145
+ type : String ,
146
+ default : ( ) => getConfigFallback ( 'labelMinutes' )
147
+ } ,
148
+ labelSeconds : {
149
+ type : String ,
150
+ default : ( ) => getConfigFallback ( 'labelSeconds' )
151
+ } ,
152
+ labelAmpm : {
153
+ type : String ,
154
+ default : ( ) => getConfigFallback ( 'labelAmpm' )
155
+ } ,
156
+ labelAm : {
157
+ type : String ,
158
+ default : ( ) => getConfigFallback ( 'labelAm' )
159
+ } ,
160
+ labelPm : {
161
+ type : String ,
162
+ default : ( ) => getConfigFallback ( 'labelPm' )
163
+ } ,
118
164
// These pick BTime or BFormSpinbutton global config if no BFormTimepicker global config
119
165
labelIncrement : {
120
166
type : String ,
@@ -123,13 +169,7 @@ const propsMixin = {
123
169
labelDecrement : {
124
170
type : String ,
125
171
default : ( ) => getConfigFallback ( 'labelDecrement' )
126
- } ,
127
- // Thes only fallback to BTime values
128
- labelNoTime : {
129
- type : String ,
130
- default : ( ) => getConfigFallback ( 'labelNoTime' )
131
172
}
132
- // TODO: add remaining props
133
173
}
134
174
}
135
175
@@ -168,18 +208,27 @@ export const BFormTimepicker = /*#__PURE__*/ Vue.extend({
168
208
const idLabel = this . safeId ( '_value_' )
169
209
const idWrapper = this . safeId ( '_b-form-time_' )
170
210
return {
211
+ hidden : ! this . visible ,
171
212
ariaControls : [ idLabel , idWrapper ] . filter ( identity ) . join ( ' ' ) || null ,
172
213
value : this . localHMS ,
173
- hidden : ! this . visible ,
174
214
readonly : this . readonly ,
175
215
disabled : this . disabled ,
176
216
locale : this . locale ,
217
+ hour12 : this . hour12 ,
177
218
hideHeader : this . hideHeader ,
178
219
showSeconds : this . showSeconds ,
220
+ secondsStep : this . secondsStep ,
221
+ minutesStep : this . minutesStep ,
222
+ labelNoTime : this . labelNoTime ,
223
+ labelSelected : this . labelSelected ,
224
+ labelHours : this . labelHours ,
225
+ labelMinutes : this . labelMinutes ,
226
+ labelSeconds : this . labelSeconds ,
227
+ labelAmpm : this . labelAmpm ,
228
+ labelAm : this . labelAm ,
229
+ labelPm : this . labelPm ,
179
230
labelIncrement : this . labelIncrement ,
180
231
labelDecrement : this . labelDecrement ,
181
- labelNoTime : this . labelNoTime
182
- // TODO: Add remaining label props here
183
232
}
184
233
}
185
234
} ,
0 commit comments