Skip to content
This repository has been archived by the owner on Apr 17, 2022. It is now read-only.

Commit

Permalink
fix: Disabled items in selection grid available for select
Browse files Browse the repository at this point in the history
  • Loading branch information
Jasenkoo committed Sep 2, 2021
1 parent dea2423 commit 2146735
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/Vue3DatePicker/components/SelectionGrid.vue
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,11 @@
* Handle click on cell, if value is enabled (not in filters), emit value back to parent
*/
const onClick = (val: string | number): void => {
if (!props.disabledValues.some((value) => value === val)) {
if (
!props.disabledValues.some((value) => value === val) &&
(props.minValue ? +props.minValue < val : true) &&
(props.maxValue ? +props.maxValue > val : true)
) {
emit('update:modelValue', val);
emit('selected');
}
Expand Down

0 comments on commit 2146735

Please sign in to comment.