Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Question] Show disabled date in input form #37

Closed
itouAho opened this issue Mar 10, 2023 · 1 comment
Closed

[Question] Show disabled date in input form #37

itouAho opened this issue Mar 10, 2023 · 1 comment

Comments

@itouAho
Copy link

itouAho commented Mar 10, 2023

is it possible to keep disabled date like in vue2-datepicker?
currently datepicker will set empty if the date is disabled, i want to set default date even it is disabled.

<script setup>
import { ref } from "vue";
import DatePicker from "vue-datepicker-next";

const date = ref("2023-03-01");

function notBeforeToday(date) {
  return date < new Date(new Date().setHours(0, 0, 0, 0));
}
</script>

<template>
  <date-picker
    v-model:value="date"
    :first-day-of-week="1"
    :clearable="false"
    :editable="false"
    :disabled-date="notBeforeToday"
    type="date"
    format="MMM, DD YYYY"
    valueType="YYYY-MM-DD"
  ></date-picker>
</template>

thank you.

@mengxiong10
Copy link
Owner

Fixed in v1.0.3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants