Skip to content

Commit 78c2d28

Browse files
committed
fixup! fix: alignment and styling of appointments
Signed-off-by: Grigory V <scratchx@gmx.com>
1 parent c9e9aa3 commit 78c2d28

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

src/components/Shared/DatePicker.vue

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,10 @@ export default {
7070
* @return {Date}
7171
*/
7272
minimumDate() {
73+
if (!this.min && this.type === 'time') {
74+
return null
75+
}
76+
7377
return this.min || new Date(this.davRestrictionsStore.minimumDate)
7478
},
7579
@@ -79,6 +83,10 @@ export default {
7983
* @return {Date}
8084
*/
8185
maximumDate() {
86+
if (!this.max && this.type === 'time') {
87+
return null
88+
}
89+
8290
return this.max || new Date(this.davRestrictionsStore.maximumDate)
8391
},
8492
},
@@ -97,7 +105,7 @@ export default {
97105
this.pendingDate = date
98106
},
99107
100-
onBlur(event) {
108+
onBlur() {
101109
// When focus leaves the picker, commit the pending date
102110
if (this.pendingDate === undefined || this.pendingDate === null) {
103111
return
@@ -117,6 +125,10 @@ export default {
117125
* @return {boolean}
118126
*/
119127
disabledDate(date) {
128+
if (!this.max && !this.min && this.type === 'time') {
129+
return false
130+
}
131+
120132
return date < this.minimumDate || date > this.maximumDate
121133
},
122134
},

0 commit comments

Comments
 (0)