GithubHelp home page GithubHelp logo

Start of Years about datepicker HOT 5 CLOSED

rehookify avatar rehookify commented on August 28, 2024
Start of Years

from datepicker.

Comments (5)

Feshchenko avatar Feshchenko commented on August 28, 2024

@asharonbaltazar, hey.
Not sure I got you.
Do you have a problem with next/previous years buttons?
Do you want to see more years on one page?

You can change the number of displayed years and mode, check in the Years Configuration doc.

    years: {
      numberOfYears: 30,
      mode: 'fluid'
    }

from datepicker.

asharonbaltazar avatar asharonbaltazar commented on August 28, 2024

Thanks for replying. I'm mapping the years array, which is found as a property in the data object returned by useDatePicker. The earliest year in the list is 2019. I'd like it to go further back.

Does that make sense?

from datepicker.

asharonbaltazar avatar asharonbaltazar commented on August 28, 2024

Ah, so if I understand correctly, I have to programmatically go back using previousYearsButton.

So then my question would be: Is there any way to map the years property as a list and avoid using the previousYearsButton?

from datepicker.

Feshchenko avatar Feshchenko commented on August 28, 2024

Years have pagination. Number of years on one page defined by numberOfYears in the Years Configuration.
And you can change mode, for example, fluid will put a cursor in the middle.
If you want to go back, you have 2 options:

  • increase numberOfYears
  • use previousYearsButton and nextYearsButton to change the page

from datepicker.

Feshchenko avatar Feshchenko commented on August 28, 2024

@asharonbaltazar , and you can check examples
You can fork and play with them

from datepicker.

Related Issues (20)

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.