shared-ritm 1.1.75 → 1.1.76

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "shared-ritm",
3
- "version": "1.1.75",
3
+ "version": "1.1.76",
4
4
  "private": false,
5
5
  "files": [
6
6
  "dist",
@@ -29,7 +29,7 @@ import AppButton from '@/common/app-button/AppButton.vue'
29
29
  interface Props {
30
30
  label: string
31
31
  modelValue: string
32
- disableRuleDates?: boolean
32
+ disableRuleDates?: (date) => boolean
33
33
  }
34
34
  const emits = defineEmits(['update:modelValue'])
35
35
  const props = defineProps<Props>()
@@ -48,7 +48,7 @@ function disablePastDates(date) {
48
48
  const [year, month, day] = date.split('/')
49
49
  const currentDate = new Date(year, month - 1, day)
50
50
  const todayDate = new Date(today.getFullYear(), today.getMonth(), today.getDate())
51
- if (props?.disableRuleDates) return currentDate >= todayDate || props.disableRuleDates
51
+ if (props?.disableRuleDates) return currentDate >= todayDate || props.disableRuleDates(date)
52
52
  return currentDate >= todayDate
53
53
  }
54
54
  </script>