Giter VIP home page Giter VIP logo

Comments (5)

aszenz avatar aszenz commented on September 25, 2024 1

Yes. To go into a bit more detail regarding our decision we found that most users who tried the picker with independent calendars found they preferred the coupled version because it involved less "clicking around".

That makes a lot of sense, thanks for providing the explanation.

What version are you using?

My apologies, I actually had modified the picker previously which caused the two individual calendar buttons to show up.

I usually copy library code instead of installing them in elm so that I can freely modify them but it makes it harder to understand where the behavior is coming from.

Anyways, it seems we are all good here, I do feel a temptation to make the individual calendar buttons show up based on a setting. But feel free to close this issue.

from elm-datetime-picker.

jmpressman avatar jmpressman commented on September 25, 2024

Hi @aszenz. Thanks for giving our library a shot!

You should still be able to select dates across a multi-month span. You just won't be able to see both selections at the same time within the calender UI. So in your case, you can select your first date in June 2021 and then navigate so that October 2021 comes into view. You should be able to see that your June selection is still there as the intermediate days will be highlighted. You can then simply select your second/end date and the date range selection should be locked in.

It's also worth noting that the picker can be configured to show the selections below the calendar UI so you always have a reference of what the current selection is. So you could have a range selected in June 2021 and navigate to June 2022 and still have reference to the current selection in June 2021.

We actually had independently navigable months in an early prototype, but found it led to a clunkier user experience than we had hoped. In the end, we deemed coupling the two calendars was the better option and will probably stick with it.

from elm-datetime-picker.

aszenz avatar aszenz commented on September 25, 2024

I just tried it again and understand it now.

You should still be able to select dates across a multi-month span. You just won't be able to see both selections at the same time within the calendar UI.

This behavior can be achieved using a single month calendar as well so showing the second month calendar is not useful.

Right now the second month calendar is only useful if u wish to select dates that are only a month apart.

Is there an assumption that the date range is likely to be less than a month apart so the picker optimizes that scenario but neglects the longer ranges scenario ?

We actually had independently navigable months in an early prototype

That's super interesting because there's three sets of buttons in the current duration picker view.

One is at the top (picker header), the other two are on each calendar view. I find that redundant since they all do the same thing, i.e they move both calendars forwards/backwards by month/year.

My initial expectation was that prev and next buttons on the picker would behave as you described , changing both calendars but the individual buttons on each calendar would only change their own views.

This is the way I think about it in terms of types:

type Msg = 
   -- Messages emitted by the Left Calendar
     LeftCalendarShowNextMonth
   | LeftCalendarShowPreviousMonth
   | LeftCalendarShowNextYear
   | LeftCalendarShowPreviousYear
   -- Messages emitted by the Right Calendar
   | RightCalendarShowNextMonth
   | RightCalendarShowPreviousMonth
   | RightCalendarShowNextYear
   | RightCalendarShowPreviousYear
  -- Messages emitted by the picker header
   | BothCalendarShowNextMonth
   | BothCalendarShowPreviousMonth
   | BothCalendarShowNextYear
   | BothCalendarShowPreviousYear

Hopefully I explained it right, if not i can capture a video highlighting this point

from elm-datetime-picker.

jmpressman avatar jmpressman commented on September 25, 2024

Is there an assumption that the date range is likely to be less than a month apart so the picker optimizes that scenario but neglects the longer ranges scenario ?

Yes. To go into a bit more detail regarding our decision we found that most users who tried the picker with independent calendars found they preferred the coupled version because it involved less "clicking around".

That's super interesting because there's three sets of buttons in the current duration picker view.

What version are you using? I have attached a screenshot from the current duration demo and there are only two sets of buttons: one for navigating from month-to-month and one for navigating from year-to-year.

Screenshot 2021-06-24 at 10 20 53

from elm-datetime-picker.

jmpressman avatar jmpressman commented on September 25, 2024

Happy to have helped! I'll close this for now.

from elm-datetime-picker.

Related Issues (18)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.