Quantcast
Channel: WPQuark Knowledge Base » All Posts
Viewing all articles
Browse latest Browse all 5050

Datepicker ignores the range of dates (JS problem)

$
0
0

Hello again,

I was trying to make range of dates, but provided JS code is just ignored and won’t do anything (if I try the same code in dev console it works).

Do you have any idea why is this happening? Note that I’ve disabled all plugins and unhook all js scripts in order to find the roots of problem.

$("#ID" ).datepicker( "option", "yearRange", "2016:2020");

I’ve checked the API docs of datepicker and non of those options is working when loaded inside js file, but works when I paste them in dev console.

// Getter
var yearRange = $( ".selector" ).datepicker( "option", "yearRange" );

// Setter
$( ".selector" ).datepicker( "option", "yearRange", "2002:2012" );
  • This topic was modified 7 hours, 22 minutes ago by  kailo.
  • This topic was modified 7 hours, 2 minutes ago by  kailo.

Viewing all articles
Browse latest Browse all 5050

Trending Articles