sprintify-ui 0.6.61 → 0.6.62
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/sprintify-ui.es.js
CHANGED
|
@@ -27275,7 +27275,7 @@ const SM = ["disabled", "placeholder"], _M = {
|
|
|
27275
27275
|
enableTime: { type: Boolean, default: !1 },
|
|
27276
27276
|
mode: { default: "single" },
|
|
27277
27277
|
noCalendar: { type: Boolean, default: !1 },
|
|
27278
|
-
disableDates: {
|
|
27278
|
+
disableDates: { default() {
|
|
27279
27279
|
return [];
|
|
27280
27280
|
} }
|
|
27281
27281
|
},
|
|
@@ -53,7 +53,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
53
53
|
default: boolean;
|
|
54
54
|
};
|
|
55
55
|
disableDates: {
|
|
56
|
-
type: import("vue").PropType<string
|
|
56
|
+
type: import("vue").PropType<(string | Date | ((date: Date) => boolean))[]>;
|
|
57
57
|
default: () => never[];
|
|
58
58
|
};
|
|
59
59
|
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
@@ -112,7 +112,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
112
112
|
default: boolean;
|
|
113
113
|
};
|
|
114
114
|
disableDates: {
|
|
115
|
-
type: import("vue").PropType<string
|
|
115
|
+
type: import("vue").PropType<(string | Date | ((date: Date) => boolean))[]>;
|
|
116
116
|
default: () => never[];
|
|
117
117
|
};
|
|
118
118
|
}>> & {
|
|
@@ -131,6 +131,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
131
131
|
showInput: boolean;
|
|
132
132
|
enableTime: boolean;
|
|
133
133
|
noCalendar: boolean;
|
|
134
|
-
disableDates: string
|
|
134
|
+
disableDates: (string | Date | ((date: Date) => boolean))[];
|
|
135
135
|
}, {}>;
|
|
136
136
|
export default _default;
|
package/package.json
CHANGED
|
@@ -81,6 +81,26 @@ DisableDates.args = {
|
|
|
81
81
|
],
|
|
82
82
|
};
|
|
83
83
|
|
|
84
|
+
const DisableMondayAndTuesdayTemplate = (args) => ({
|
|
85
|
+
components: { BaseDatePicker, ShowValue },
|
|
86
|
+
setup() {
|
|
87
|
+
const value = ref('2022-01-03');
|
|
88
|
+
const disableDates = [
|
|
89
|
+
(date) => {
|
|
90
|
+
return date.getDay() == 1 || date.getDay() == 2;
|
|
91
|
+
}
|
|
92
|
+
]
|
|
93
|
+
return { value, args, disableDates };
|
|
94
|
+
},
|
|
95
|
+
template: `
|
|
96
|
+
<BaseDatePicker v-model="value" v-bind="args" :disableDates="disableDates">
|
|
97
|
+
</BaseDatePicker>
|
|
98
|
+
<ShowValue :value="value" />
|
|
99
|
+
`,
|
|
100
|
+
});
|
|
101
|
+
|
|
102
|
+
export const DisableMondayAndTuesday = DisableMondayAndTuesdayTemplate.bind({});
|
|
103
|
+
|
|
84
104
|
export const RangeDisableDates = Template.bind({});
|
|
85
105
|
RangeDisableDates.args = {
|
|
86
106
|
disableDates: [
|
|
@@ -72,7 +72,7 @@ const props = withDefaults(
|
|
|
72
72
|
enableTime?: boolean;
|
|
73
73
|
mode?: 'single' | 'multiple' | 'range' | 'time';
|
|
74
74
|
noCalendar?: boolean;
|
|
75
|
-
disableDates?: string
|
|
75
|
+
disableDates?: (string | Date | ((date: Date) => boolean))[];
|
|
76
76
|
}>(),
|
|
77
77
|
{
|
|
78
78
|
modelValue: null,
|
|
@@ -167,6 +167,7 @@ const datepicker = ref(null) as Ref<HTMLInputElement | null>;
|
|
|
167
167
|
let picker = null as Instance | null;
|
|
168
168
|
|
|
169
169
|
const flatpickrConfig = computed(() => {
|
|
170
|
+
|
|
170
171
|
return {
|
|
171
172
|
enableTime: props.enableTime,
|
|
172
173
|
dateFormat: formatInternal.value,
|