EasyUI Forum
March 28, 2024, 11:32:39 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: calendarOptions validator not validating?  (Read 5077 times)
chrwei
Full Member
***
Posts: 219


View Profile Email
« on: August 17, 2020, 07:43:02 AM »

I have this validator
Code:
calendarOptions={{
validator: (date) => {
let now = new Date();
let day90 = new Date(now.getFullYear(), now.getMonth(), now.getDate() + 90);
//converted to match database
let compday = new Date(date).toISOString();
return date <= day90 && listData.dateList.indexOf(compday) >= 0;
}
}}

I have one customer that this does not work for (all dates are not valid), with no errors on the console log.  I was able to verify that the array is actually populated, I'm adding a log inside the validator next to make sure that's running.  I'm also removing the 90 day check and building that into the date list instead.

are there any known Chrome extensions that might cause these sort of problems with EasyUI?
Logged
chrwei
Full Member
***
Posts: 219


View Profile Email
« Reply #1 on: August 17, 2020, 11:32:50 AM »

I've found they have a SonicWall, and it isn't reporting anything being filtered.
Logged
chrwei
Full Member
***
Posts: 219


View Profile Email
« Reply #2 on: August 18, 2020, 07:01:36 AM »

it was timezones.  javascript's date object is a real pain across timezones.
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!