EasyUI Forum
October 10, 2024, 10:28:54 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: repaint/redraw calendar  (Read 2984 times)
Coder
Jr. Member
**
Posts: 96


View Profile
« on: August 09, 2020, 10:25:57 PM »

Hi !

Have datebox :
Code:
$('#sTo').datebox().datebox('calendar').calendar({
validator: function(date){
var d1 = new Date($('#sDate').prop('sMin')||0);
var d2 = new Date($('#sDate').prop('sMax')||0);
return d1<=date && date<=d2;
}
,styler: function(date){
var d1 = new Date($('#sDate').prop('sMin')||0);
var d2 = new Date($('#sDate').prop('sMax')||0);
return (d1<=date && date<=d2)?'background-color:#0c0':'';
}
});

How repaint calendar when set new values to '#sDate' propertys

Code:
$('#sDate').prop('sMin',aMin).prop('sMax',aMax);

$('#sTo').datebox().datebox('calendar').calendar('repaint'); // ;) ???

?

Thanxx
« Last Edit: August 10, 2020, 07:34:45 AM by Coder » Logged
jarry
Administrator
Hero Member
*****
Posts: 2274


View Profile Email
« Reply #1 on: August 12, 2020, 04:39:14 PM »

Call this line to repaint the calendar.
Code:
$('#sTo').datebox('calendar').calendar();
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!