tdesign-vue-next
Version:
TDesign Component for vue-next
43 lines (39 loc) • 1.36 kB
JavaScript
/**
* tdesign v1.20.3
* (c) 2026 tdesign
* @license MIT
*/
import { isObject } from 'lodash-es';
import { d as dayjs } from '../../_chunks/dep-9fc6972b.mjs';
import { b as isEnabledDate } from '../../_chunks/dep-519de3c0.mjs';
import '../../_chunks/dep-d84a2ec7.mjs';
import '../../_chunks/dep-0841ee8f.mjs';
import '../../_chunks/dep-ff183185.mjs';
import '../../_chunks/dep-390963eb.mjs';
import '../../_chunks/dep-07d8f2aa.mjs';
import '../../_chunks/dep-bc94003b.mjs';
import '../../_chunks/dep-c05afcc8.mjs';
import '../../_chunks/dep-ce5b44b1.mjs';
import '../../_chunks/dep-ad9e539e.mjs';
import '../../_chunks/dep-4c65e11b.mjs';
function useDisableDate(props) {
var _disableDate = props.disableDate,
format = props.format,
mode = props.mode,
start = props.start,
end = props.end;
return {
disableDate: function disableDate(value) {
return !isEnabledDate({
disableDate: _disableDate,
format: format,
mode: mode,
value: value
});
},
minDate: isObject(_disableDate) && "before" in _disableDate ? new Date(dayjs(_disableDate.before).startOf("day").format()) : start,
maxDate: isObject(_disableDate) && "after" in _disableDate ? new Date(dayjs(_disableDate.after).endOf("day").format()) : end
};
}
export { useDisableDate };
//# sourceMappingURL=useDisableDate.mjs.map