EasyUI Forum
May 15, 2024, 10:41:43 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: Weeknumbers in calendar  (Read 10535 times)
jega
Full Member
***
Posts: 190


View Profile
« on: June 24, 2016, 05:53:52 AM »

Is there any way to show weeknumbers to the left of dates Huh?

Logged
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #1 on: June 24, 2016, 08:16:05 PM »

This feature is not supported in current version.
Logged
jega
Full Member
***
Posts: 190


View Profile
« Reply #2 on: June 26, 2016, 11:29:20 AM »

But Will it come in the future, and hos Can i modify it to do it now.

Any help is wellcome
Logged
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #3 on: June 28, 2016, 12:35:18 AM »

The 'showWeek' property will be available since next version. You can download the patch from http://www.jeasyui.com/download/downloads/jquery-easyui-1.4.5-patch.zip to use this feature in current version.
Code:
$('#cc').calendar({
  showWeek: true
});
Logged
arma
Full Member
***
Posts: 110


View Profile
« Reply #4 on: June 29, 2016, 02:48:28 PM »

Hi Stworthy,

Can we have custom week number ?

Regards
Logged
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #5 on: June 29, 2016, 08:35:27 PM »

You can override the $.fn.calendar.defaults.getWeekNumber function to custom the week number.
Code:
$.extend($.fn.calendar.defaults, {
  getWeekNumber: function(date){
    var weekNumber = ...
    return weekNumber;
  }
});
Logged
jega
Full Member
***
Posts: 190


View Profile
« Reply #6 on: July 16, 2016, 11:25:33 AM »

Hi stworthy

Thank you very much. Looks great, BUT.  Grin

Weeknumber is Black, and fall into the dates. Can it be etc. blue ??

Is it also possible to get weekNumbers in datebox and datetimebox ??

Logged
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #7 on: July 17, 2016, 08:03:15 PM »

You can override the '.calendar-week' CSS value to modify the week number style.
Code:
<style>
.calendar-week{
color:#666;
}
</style>
Logged
jega
Full Member
***
Posts: 190


View Profile
« Reply #8 on: August 30, 2016, 10:51:39 PM »

Hi.

why does this not Work ?

<input id="db1" name="db1" class="easyui-datebox">
<input id="db2" name="db2" class="easyui-datebox">

<script type="text/javascript">
   $( document ).ready(function(){
   
      $('.easyui-datebox').datebox('calendar').calendar({showWeek:true,weekNumberHeader:'u'});
   

   });
   
   
</script>


Only db1 get showWeek true
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!