EasyUI Forum
May 17, 2024, 11:52:38 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: Suppress unnecessary row of dates from last month in Calendar  (Read 4399 times)
akashana
Newbie
*
Posts: 23


View Profile
« on: March 09, 2020, 12:54:34 AM »

Hello,

For the month of March 2020, the calendar control is showing unnecessary row of dates from last month i.e. 23-29th Feb. Please see attached image. How to suppress that row ?

Thanks,
Logged
jahangir
Jr. Member
**
Posts: 51



View Profile Email
« Reply #1 on: March 09, 2020, 10:04:32 PM »

use following css.

Code:
.calendar-other-month{	
visibility: hidden;
}


http://code.reloado.com/jbhatti/23/edit#html,live
Logged
akashana
Newbie
*
Posts: 23


View Profile
« Reply #2 on: March 10, 2020, 10:08:55 PM »

Thanks but then it displays one blank row for March 2020. Any solution to hide this blank row ?
Logged
jahangir
Jr. Member
**
Posts: 51



View Profile Email
« Reply #3 on: March 10, 2020, 11:54:25 PM »

Try this.

Code:
<div id="c1" class="easyui-calendar" style="width:250px;height:250px;"></div> 

Code:
.calendar-other-month{	
visibility: hidden;
}

Code:
$('#c1').calendar({
onNavigate: function(year,month){   
if($("#c1").find("tr.calendar-first").find(".calendar-last").css("visibility") == 'hidden'){
$("#c1").find("tr.calendar-first").css("display","none");
}
if($("#c1").find("tr.calendar-last").find(".calendar-first").css("visibility") == 'hidden'){
$("#c1").find("tr.calendar-last").css("display","none");
}
}
});



http://code.reloado.com/jbhatti/24/edit
Logged
akashana
Newbie
*
Posts: 23


View Profile
« Reply #4 on: March 13, 2020, 03:14:58 AM »

Great ! Thanks a ton.
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!