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

n-date-picker: choose month shown when opening the calendar #4493

Closed
Mutusen opened this issue Feb 17, 2023 · 1 comment · Fixed by #5701
Closed

n-date-picker: choose month shown when opening the calendar #4493

Mutusen opened this issue Feb 17, 2023 · 1 comment · Fixed by #5701
Labels
feature request New feature or request

Comments

@Mutusen
Copy link
Contributor

Mutusen commented Feb 17, 2023

This function solves the problem (这个功能解决的问题)

I am using the n-date-picker component with type="date". When the value is null and the user clicks on the field and the calendar opens, it automatically shows the current month. However, I would like to show a specific month instead and I found no way to do this. (Concretely, I would like the user to pick a date in July or August, but we are in February and they have to click "next month" several times.) I tried the default-value parameter but it doesn't appear to do anything, at least with type="date".

Expected API (期望的 API)

A new parameter, e.g. default-view:

<n-date-picker
v-model:value="timestamp"
type="date"
default-view="2023-07-15"
/>

So if timestamp is null, when the user clicks on the field, the calendar automatically shows the month containing the date 2023-07-15.

@github-actions github-actions bot added the feature request New feature or request label Feb 17, 2023
@Jonas949
Copy link

Is there a solution now?

jizai1125 added a commit to jizai1125/naive-ui that referenced this issue Feb 22, 2024
jizai1125 added a commit to jizai1125/naive-ui that referenced this issue Feb 22, 2024
jizai1125 added a commit to jizai1125/naive-ui that referenced this issue Feb 23, 2024
07akioni added a commit that referenced this issue Feb 23, 2024
…is `date\datetime\week`, closes #4493 (#5701)

Co-authored-by: 07akioni <07akioni2@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New feature or request
Projects
None yet
2 participants