File tree Expand file tree Collapse file tree 3 files changed +22
-0
lines changed Expand file tree Collapse file tree 3 files changed +22
-0
lines changed Original file line number Diff line number Diff line change 133133  color  : #f00 ;
134134}
135135
136+ .react-datepicker__week.highlighted  {
137+   background-color  : #ddffdd ;
138+   border-radius  : 5px  ;
139+ }
140+ 
136141.example-custom-input  {
137142  cursor : pointer ;
138143  padding  : 5px   15px  ;
Original file line number Diff line number Diff line change @@ -18,6 +18,7 @@ import CustomDateFormat from "../../examples/customDateFormat?raw";
1818import  CustomClassName  from  "../../examples/customClassName?raw" ; 
1919import  CustomCalendarClassName  from  "../../examples/customCalendarClassName?raw" ; 
2020import  CustomDayClassName  from  "../../examples/customDayClassName?raw" ; 
21+ import  CustomWeekClassName  from  "../../examples/customWeekClassName?raw" ; 
2122import  CustomTimeClassName  from  "../../examples/customTimeClassName?raw" ; 
2223import  Today  from  "../../examples/today?raw" ; 
2324import  PlaceholderText  from  "../../examples/placeholderText?raw" ; 
@@ -222,6 +223,10 @@ export default class exampleComponents extends React.Component {
222223      title : "Custom day class name" , 
223224      component : CustomDayClassName , 
224225    } , 
226+     { 
227+       title : "Custom week class name" , 
228+       component : CustomWeekClassName , 
229+     } , 
225230    { 
226231      title : "Custom date format" , 
227232      component : CustomDateFormat , 
Original file line number Diff line number Diff line change 1+ ( )  =>  { 
2+   const  [ selectedDate ,  setSelectedDate ]  =  useState ( new  Date ( ) ) ; 
3+   return  ( 
4+     < DatePicker 
5+       selected = { selectedDate } 
6+       onChange = { ( date )  =>  setSelectedDate ( date ) } 
7+       weekClassName = { ( date )  => 
8+         getDate ( date )  %  2  ===  0  ? "highlighted"  : undefined 
9+       } 
10+     /> 
11+   ) ; 
12+ } ; 
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments