File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -21,7 +21,8 @@ const ItemTemplate = React.memo((props: ItemTemplateProps) => {
2121 updateFirstDate,
2222 dayHover,
2323 changeDayHover,
24- hideDatepicker
24+ hideDatepicker,
25+ changeDatepickerValue
2526 } = useContext ( DatepickerContext ) ;
2627
2728 // Functions
@@ -44,18 +45,23 @@ const ItemTemplate = React.memo((props: ItemTemplateProps) => {
4445 }
4546 changeInputText ( `${ item . start } ~ ${ item . end } ` ) ;
4647 changePeriod ( item ) ;
48+ changeDatepickerValue ( {
49+ startDate : item . start ,
50+ endDate : item . end
51+ } ) ;
4752 updateFirstDate ( dayjs ( item . start ) ) ;
4853 hideDatepicker ( ) ;
4954 } ,
5055 [
56+ changeDatepickerValue ,
5157 changeDayHover ,
5258 changeInputText ,
5359 changePeriod ,
5460 dayHover ,
61+ hideDatepicker ,
5562 period . end ,
5663 period . start ,
57- updateFirstDate ,
58- hideDatepicker
64+ updateFirstDate
5965 ]
6066 ) ;
6167
You can’t perform that action at this time.
0 commit comments