File tree Expand file tree Collapse file tree 3 files changed +7
-2
lines changed Expand file tree Collapse file tree 3 files changed +7
-2
lines changed Original file line number Diff line number Diff line change 1+ # v0.5.5  
2+ ## Bug Fixes  
3+ *  Fix miscalculation of day numbers for previous months when ` firstDayOfWeek !== 1 ` . Closes #44  .
4+ 
15# v0.5.4  
26## Bug Fixes  
37*  Pass missing ` page `  attribute to ` header-title `  slot
Original file line number Diff line number Diff line change 11{
22  "name" : " v-calendar" 
3-   "version" : " 0.5.4 " 
3+   "version" : " 0.5.5 " 
44  "description" : " A clean and extendable plugin for building simple attributed calendars in Vue.js." 
55  "keywords" : [
66    " vue" 
Original file line number Diff line number Diff line change @@ -39,11 +39,12 @@ export default {
3939    weeks () { 
4040      const  weeks  =  []; 
4141      const  { firstDayOfWeek , firstWeekday  } =  this .monthComps ; 
42+       const  prevMonthDaysToShow  =  (firstWeekday +  (firstWeekday <  firstDayOfWeek ?  7  :  0 )) -  firstDayOfWeek; 
4243      let  prevMonth =  true ; 
4344      let  thisMonth =  false ; 
4445      let  nextMonth =  false ; 
4546      //  Init counters with previous month's data 
46-       let  day =  (this .prevMonthComps .days  -  Math . abs (firstWeekday  -  firstDayOfWeek) ) +  1 ; 
47+       let  day =  (this .prevMonthComps .days  -  prevMonthDaysToShow ) +  1 ; 
4748      let  dayFromEnd =  (this .prevMonthComps .days  -  day) +  1 ; 
4849      let  weekdayOrdinal =  Math .floor (((day -  1 ) /  7 ) +  1 ); 
4950      let  weekdayOrdinalFromEnd =  1 ; 
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments