Giter VIP home page Giter VIP logo

elm-datetime-picker's Issues

Maintainer

Hello,

I would like to become a maintainer for this repo. I can help with:

  • response times, since it's a bit slow
  • ideas
  • implementation
  • reviewing pr's and issues

This is a great calendar library and I would like to see it grow and improve. I can help with that.

Thank you

Date range presets

Hi, is there possible to implement date range presets such as these :

image

Responsiveness and other thoughts

Hi again, I've been using this component for a while now and it's great.

I have some issues with the responsiveness of the daterangepicker, do you guys have any tips how to solve that? For example how to adjust it for smaller screens like a phone. I assume the best way would be to flip it vertically for smaller devices.

Disable partial day

Right now the datetime picker does not handle disabling a portion of the day. It is either totally unselectable or fully selectable.

Imports to Utilities don't work

These imports don't work for me:
import DatePicker.Styles
import DatePicker.Utilities
import DatePicker.Icons

This is the error message:

17| import DatePicker.Styles
           ^^^^^^^^^^^^^^^^^
I checked the "dependencies" and "source-directories" listed in your elm.json,
but I cannot find it! Maybe it is a typo for one of these names?

And I have the package installed via elm install.
This is the line in elm.json:
"mercurymedia/elm-datetime-picker": "1.1.0",

Next release

When are you planning on releasing the next version of this package? I see #15 removes the need for the confirmation button and that's exactly what we need :)

Thanks!

Max range and allow future

Is it possible to set a max range for the range picker?

Also, is it possible to not allow future in the range picker?

Race condition when choosing different date

Bug description

When a date and time have been chosen using the datetime picker, clicking on a different date might trigger a race condition, which causes the datetime picker to utilize an old version of its model. This results in displaying the time of a previous selection, instead of its current selection (i.e. model).

The bug is caused because the update function is called from within the view. This happens for example on this line, but there are multiple instances. This is considered bad practice in Elm. The model should only be updated from the update function, not from within the view itself. This might cause unpredictable behavior as described above.

To summarize what happens in terms of events:

  1. View rendered with PickerModel1
  2. We receive updated PickerModel2
  3. We render our own view with PickerModel2, but before that is completed a new event from the view sends us a PickerModel2B based on PickerModel1

How to reproduce

  1. Select a date and time using the datetime picker (e.g. 2022-05-07 12:30).
  2. Quickly select another date and time using the datetime picker (e.g. 2022-05-08 11:30).
  3. Quickly select another day (e.g. 2022-05-01).
  4. Most likely the time will be 12:30 instead of 11:30.

Please note, that the race condition might not always occur. Though, it is triggered more easily when selecting another date more quickly, shortly after changing the time.

Expected behavior

The datetime picker always utilizes the latest version of its model, and the time does not change when choosing another date.

Suggested change

Rewrite the datetime picker so the model is not updated from within the view, but from the update function instead. This is a major breaking change, hence I'm starting with the creation of this issue, rather than a PR.

If necessary, I could provide a screen capture exposing the bug.

Time not shown for whole days

When the allowed times are set to the whole day, eg. by using

                    , allowedTimesOfDay =
                        \_ _ -> { startHour = 0, startMinute = 0, endHour = 23, endMinute = 59 }

the time is not shown and therefore not editable, even when using Toggleable or AlwaysVisible.

screenshot-2023-05-10T15:59:14+02:00

I suggest the time should always be shown when Toggleable or AlwaysVisible is configured.

Duration date picker calendars cannot be more than 1 month apart

First of all thanks for creating this library, I really like the design and architecture of this.
It's my fav date picker library so far.

Just one thing I noticed that I would like to point out:

I see that the previous / next month buttons change both calendar views (left and right) in the duration date picker.
Same is the case for next / previous year.

In my opinion the two calendars should be independently navigable so that user can select dates between long date ranges.

Example:
Selecting a range date from June 2021 to October 2021 doesn't seem to be possible currently.

Set time to 00:00:00 disables time picker part!

When the time is set to 00:00:00 the time part is disabled.
I have zone = Zone.utc and timePickerVisibility = SingleDatePicker.AlwaysVisible SingleDatePicker.defaultTimePickerSettings.
As soon as I set the time to all zeroes, the time picker portion is not shown any more, and there is no way to display it.

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.