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

Issue Linked pickers #2611

Closed
Eonasdan opened this issue Jul 22, 2022 Discussed in #2605 · 8 comments
Closed

Issue Linked pickers #2611

Eonasdan opened this issue Jul 22, 2022 Discussed in #2605 · 8 comments

Comments

@Eonasdan
Copy link
Owner

Discussed in #2605

Originally posted by cwolcott July 11, 2022
I not sure if this is a bug, if I am missing a call or just the way it is.

Description:

  • The linked pickers are configured to make sure the start date <= end date, like the example
  • I would like the picker to show the current month/year if a date is currently set.

Steps:
1a - Select Button [A] which sets the Start Date (2022-05-05) then the End Date (2022-09-09)
1b - Click the calendar icon for End Date, the calendar is viewing September 2022 and shows the set day 9th.
1c - Click the calendar icon for Start Date, the calendar is viewing the current month (July 2022)
1d - I was hoping it would show the month of the set date (May 2022)

2a - Select Button [B] which sets the End Date (2022-09-09) then the Start Date (2022-05-05)
2b - Click the calendar icon for Start Date, the calendar is viewing May 2022 and shows the set day 5th.
2c - Click the calendar icon for End Date, the calendar is viewing the current month (July 2022)
2d - I was hoping it would show the month of the set date (September 2022)

What can I do so that when the picker is shown the view shows the current month set?

Here is an example

The same issue happens with the Tempus Dominus Examples: Linked Picker

Steps:
3a - Pick a From Date of July 27, 2022
3b - Pick a To Date of Nov 12, 2022
3c - Click the calendar icon for the From Date, the calendar is viewing the To Date month November 2022 and not July 2022.

@cwolcott
Copy link

Are you considering this for any upcoming releases?

@Eonasdan
Copy link
Owner Author

Yes. My free time has been limited recently.

@Eonasdan Eonasdan added Area: TypeScript State: planned This ticket is planned to be worked on. Priority: Medium labels Oct 24, 2022
@Eonasdan Eonasdan moved this to 🆕 New in Tempus Dominus Oct 24, 2022
@Eonasdan Eonasdan moved this from 🆕 New to 📋 Backlog in Tempus Dominus Oct 24, 2022
@Eonasdan Eonasdan moved this from 📋 Backlog to 🔖 Ready in Tempus Dominus Oct 25, 2022
@Eonasdan Eonasdan moved this from 🔖 Ready to 🏗 In progress in Tempus Dominus Oct 25, 2022
@Eonasdan
Copy link
Owner Author

Still working on this but for the time being see if this helps

 const s = new tempusDominus.DateTime('2022-05-05 00:00:00');
      startDatePicker.dates.setFromInput(s);
      endDatePicker.dates.setFromInput('2022-09-09 00:00:00');
      startDatePicker.optionsStore.viewDate = s; //using optionstore and after set from input

There's something that is syncing the view dates between pickers and I haven't pinned down why

@Eonasdan
Copy link
Owner Author

I please check out this branch. I think I've fixed this issue https://github.com/Eonasdan/tempus-dominus/tree/2611-issue-linked-pickers

@Eonasdan
Copy link
Owner Author

Here's a StackBlitz

@Eonasdan Eonasdan moved this from 🏗 In progress to 👀 In review in Tempus Dominus Oct 27, 2022
@cwolcott
Copy link

Will check it out today

Eonasdan added a commit that referenced this issue Oct 29, 2022
@Eonasdan Eonasdan mentioned this issue Oct 29, 2022
Eonasdan added a commit that referenced this issue Oct 29, 2022
@Eonasdan Eonasdan moved this from 👀 In review to 🚀 Released in Tempus Dominus Oct 29, 2022
@Eonasdan
Copy link
Owner Author

This was released with 6.2.6

Repository owner moved this from 🚀 Released to ✅ Done in Tempus Dominus Oct 29, 2022
@Eonasdan Eonasdan moved this from ✅ Done to 🚀 Released in Tempus Dominus Oct 29, 2022
@cwolcott
Copy link

cwolcott commented Nov 1, 2022

Thank you so much. This works perfectly.

@Eonasdan Eonasdan removed the State: planned This ticket is planned to be worked on. label Nov 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

When branches are created from issues, their pull requests are automatically linked.

2 participants