Skip to content

Commit

Permalink
Merge pull request #36 from shubhadip/opendate-chg
Browse files Browse the repository at this point in the history
fix: check for openDate while init
  • Loading branch information
shubhadip authored Feb 2, 2022
2 parents 1bfdf43 + fbf1cdf commit 8080b95
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/components/datepicker/Datepicker.vue
Original file line number Diff line number Diff line change
Expand Up @@ -566,6 +566,9 @@ export default defineComponent({
if (props.value) {
setValue(props.value as any);
}
if (props.openDate && !props.value) {
setValue(props.openDate as any);
}
if (isInline.value) {
setInitialView();
}
Expand Down
1 change: 1 addition & 0 deletions src/components/examples/Disabled.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
<appdate-picker
placeholder="Select Date"
@input="dateSelected"
:openDate="new Date('2020-11-06')"
:disabled-dates="{
to: new Date(2020, 10, 5),
from: new Date(2020, 10, 16),
Expand Down

0 comments on commit 8080b95

Please sign in to comment.