Git Product home page Git Product logo

Comments (7)

trafficonese avatar trafficonese commented on June 3, 2024 1

6382bd6 allows now to update ranges. Feel free to reopen if you find any issue.

from daterangepicker.

mzorko avatar mzorko commented on June 3, 2024

Hi. Anything on this? Would be super useful to update ranges.

from daterangepicker.

trafficonese avatar trafficonese commented on June 3, 2024

Thanks for the suggestions, I will look into it. That definitly sounds like a great addition.

from daterangepicker.

trafficonese avatar trafficonese commented on June 3, 2024

It seems like style and class are doable, but the language cannot be changed, since it is set globally in the initializing-step. Would that be really useful? I think once a correct locale is set, it should stay that way or?

Unfortunately, the library doesn't offer an official way to update the ranges. I think I have a working fix, but I'm not sure what side-effects that might have, since I just change the range-list in the HTML and replace it with the new one.

One problem for example seems to be, that the new range doesn't respect the minimum date.

from daterangepicker.

ltuijnder avatar ltuijnder commented on June 3, 2024

@trafficonese

This post: https://stackoverflow.com/questions/18955397/update-the-selected-dates-of-date-range-picker-for-twitter-bootstrap does show that you can update it via javascript. Not sure if you have to perform some manual checks for the min and max

from daterangepicker.

ltuijnder avatar ltuijnder commented on June 3, 2024

And I also agree that language might not be the most interesting to update. So I do not think that this is a huge issue. But would have been nice for completion's sake.

from daterangepicker.

trafficonese avatar trafficonese commented on June 3, 2024

Yes, I was wrong. I figured it out already.
The SO-answer doesn't really update the predefined ranges, but the start and endDate.

Anyway, I'll push a fix in a bit. :)

from daterangepicker.

Related Issues (12)

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.