Duk
Duk

Reputation: 927

Datetime picker how to show all year

I am using jquery datetime picker. But it shows year from 2003 to 2023. I want it should show from before some 19 type of years. How will change this?

I put screenshot,

Datetime picker showing

Please any suggestions?

Upvotes: 1

Views: 136

Answers (2)

RGR
RGR

Reputation: 1571

You can set the range of years using yearRange in datepicker.

$( ".selector" ).datepicker({ yearRange: "1990:2013" });

Check this jQuery documentation link for further reference.

Upvotes: 0

benni_mac_b
benni_mac_b

Reputation: 8887

Try adding the following yearRange argument to the datepicker options and tweak the values to get the ranges you want

    yearRange: "-18:-0"

Upvotes: 1

Related Questions