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

Update the date without selecting/clicking a day #2811

Closed
2 tasks done
Antoniafriedrich opened this issue May 15, 2023 · 6 comments
Closed
2 tasks done

Update the date without selecting/clicking a day #2811

Antoniafriedrich opened this issue May 15, 2023 · 6 comments

Comments

@Antoniafriedrich
Copy link

Antoniafriedrich commented May 15, 2023

Prerequisites

Proposal

I am able to select "YY", "YY/MM" or any other format that do not feature day in it.
However, regardless of format my datetime value in the input field does not update unless I select the day.

When selecting time, the values for hours, minutes and seconds update in my formfield in real time and not only when you select the smallest value. This function should exist for date as well.

Motivation and context

This function is usefull for formats that have no day component as well as for formats that do have a day component.

Users might accidently select an incorrect month or year in their selection but not notice until their date selection is complete. If they attempt to go back and select a different month, they might not select a day again, because the day was already correctly selected. They would expect the form to automatically update with the new selection even without selecting a day. In that case they would unknowingly submit an inaccurate date, if they do not double check.

@Antoniafriedrich Antoniafriedrich added State: Triage Tickets that need to be triaged. Type: Feature Request labels May 15, 2023
@github-project-automation github-project-automation bot moved this to 🆕 New in Tempus Dominus May 15, 2023
@Eonasdan Eonasdan added Area: TypeScript Priority: Medium and removed State: Triage Tickets that need to be triaged. labels May 22, 2023
@Eonasdan Eonasdan moved this from 🆕 New to 🔖 Ready in Tempus Dominus May 22, 2023
@Eonasdan Eonasdan moved this from 🔖 Ready to 🏗 In progress in Tempus Dominus May 22, 2023
@Eonasdan
Copy link
Owner

Hello, please try the following configuration and let me know if this meets your needs.

{
  display: {
    components: {
      clock: false,
      date: false
    }
  },
  localization: {
    format: 'yy/MM'
  }
}

@Eonasdan Eonasdan moved this from 🏗 In progress to 👀 In review in Tempus Dominus May 25, 2023
@Antoniafriedrich
Copy link
Author

Hello and thank you for your response! Unfortunatelly this did not help solving my problem.
I think there was a slight misunderstanding, even if this gives me a good example to explain better what I meant.

How it is now:
If the format is yy/MM it updates when selecting the month, when it is yy/MM/dd it updates when selecting the day.

What I want:
When selecting the year the year updates, when selecting the month the month updates, when selecting the day the day updates, as in when I click the associated buttons, regardless of the format I am using.

Thank you again and sorry for not being clear enough about it the first time.

@Eonasdan Eonasdan moved this from 👀 In review to ✅ Done in Tempus Dominus Jul 3, 2023
@Eonasdan Eonasdan moved this from ✅ Done to 👀 In review in Tempus Dominus Jul 3, 2023
@Eonasdan Eonasdan moved this from 👀 In review to 🏗 In progress in Tempus Dominus Jul 6, 2023
Eonasdan added a commit that referenced this issue Aug 17, 2023
fixes #2846
fixes #2845
@Eonasdan
Copy link
Owner

Hi 6.7.13 should be released shortly to solve this.

@Antoniafriedrich
Copy link
Author

Thank you! Very great work!

@github-project-automation github-project-automation bot moved this from 🏗 In progress to ✅ Done in Tempus Dominus Aug 21, 2023
@dani-filipovic
Copy link

dani-filipovic commented Sep 29, 2023

This should DEFINITELY be optional. This is not standard or expected behaviour with datepickers. Just spent good three hours figuring out why my dates are changing when i am just clicking around, i was even trying to .setValue(event.details.oldDate) if modeView was !== 'calendar' etc. to fix this. Not everybody wants this and i suggest adding something like allElementsUpdateValue: boolean to the options.

Eonasdan added a commit that referenced this issue Oct 6, 2023
Fixed #2850
Fixed #2855
@Eonasdan
Copy link
Owner

Eonasdan commented Oct 6, 2023

I had to revert this. Sorry @Antoniafriedrich. This also broke multidates.

Eonasdan added a commit that referenced this issue Nov 6, 2023
* 6.7.11

* 6.7.11

* fixes #2828

* fixes #2828

* fixes #2811
fixes #2846
fixes #2845

* stupid git

* #2850 fixes max date

* #2850 fixes max date

* #2855 fixes format strings

* Reverted #2811
Fixed #2850
Fixed #2855

* merge latest v6
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

No branches or pull requests

3 participants