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

Dates don't work as arguments in uislider and uirange #227

Closed
jchojna opened this issue Jul 17, 2020 · 6 comments
Closed

Dates don't work as arguments in uislider and uirange #227

jchojna opened this issue Jul 17, 2020 · 6 comments
Assignees

Comments

@jchojna
Copy link
Contributor

jchojna commented Jul 17, 2020

Some quick test:

works in shiny function

sliderInput("shiny_slider",
              "Shiny Slider",
              as.Date("2019-01-23"),
              as.Date("2019-03-23"),
              as.Date("2019-01-23")),

not working in semantic

uislider("semantic_slider",
           value = as.Date("2019-01-23"),
           min = as.Date("2019-01-23"),
           max = as.Date("2019-03-23")),

Similarly in uirange

@jchojna jchojna added the bug label Jul 17, 2020
@dokato
Copy link
Contributor

dokato commented Jul 22, 2020

related to #160

@rabiibouhestine
Copy link
Contributor

Fomantic UI slider does not seem to support dates out of the box (docs).

One solution is to add a labels parameter to shiny.semantic::sliderInput then use fomantic interpretLabel function to assign a date as label to each value in the slider, but I believe this is not optimal as we will have to define a list of dates then we will have to work with the dates indexes in the list.

Maybe leave dates to be handled by calendar instead? We can even add a calender_range wrapper for the fomantic calender range ? @dokato ?

@dokato
Copy link
Contributor

dokato commented Dec 15, 2020

Agreed, date range would be super useful, and that difficult to do with the calendar we have(?).

@rabiibouhestine
Copy link
Contributor

We can just use the calendar() that we have and define two calendars for a start date and an end date, implementing a calender_range() will only allow us to put two calendars in one single widget basically.

@dokato
Copy link
Contributor

dokato commented Dec 15, 2020

Yes, exactly, something like that. But also coming back to the original topis, if shiny slider supports the dates, we should at least throw a warning that this feature is not implemented in Fomantic.

@esraay
Copy link
Contributor

esraay commented Jul 22, 2022

This issue will be fixed with #363

@esraay esraay closed this as completed Jul 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

No branches or pull requests

5 participants