Monday, June 3, 2024
 Popular · Latest · Hot · Upcoming
14
rated 0 times [  21] [ 7]  / answers: 1 / hits: 15068  / 9 Years ago, tue, august 4, 2015, 12:00:00

I got this error TypeError: date.match is not a function when i try to set up a date list to be showed in datepicker



$('#datepicker').datepicker({
format: dd/mm/yyyy,
language: pt-BR,
multidate: true
});
//this dates is just a example, I already try to create from another way like:
// var data = new Array(2015-06-19, 2015-06-15)
//and also not work!

var dates = [2015-06-19, 2015-06-15];
$('#datepicker').datepicker('update', datas);


I notice in the doc Each date is assumed to be a “local” date object, and will be converted to UTC for internal use.



I don't understood what it means. Should I create a list of dates or an Array? what is the difference between them, they are not the same thing?


More From » jquery

 Answers
31

I got it, I just change the last row of code:



$('#datepicker').datepicker('update', datas); //to
$('#datepicker').datepicker('setDate', datas);


Thanks All!


[#65550] Saturday, August 1, 2015, 9 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
dayshadelaniej

Total Points: 668
Total Questions: 121
Total Answers: 121

Location: Sao Tome and Principe
Member since Wed, Dec 21, 2022
1 Year ago
;