iamvivekkaushik / DatePickerTimelineFlutter

Flutter Date Picker Library that provides a calendar as a horizontal timeline
Apache License 2.0
283 stars 198 forks source link

selection color is not changing on date selection #24

Closed the-deadshot closed 4 years ago

the-deadshot commented 4 years ago

when i am using setState() date is changing but selection color is not changing. if i am doing something wrong please let me know.

child: DatePickerTimeline( DateTime.now(), onDateChange: (date) {

                    setState(() {
                      _date = date;
                    });
                  }, 
iamvivekkaushik commented 4 years ago

change DateTime.now() with the _date variable.

DatePickerTimeline(
    _date,
    onDateChange: (date) {
         setState(() {
             _date = date;
         });
  },
),
the-deadshot commented 4 years ago

@iamvivekkaushik thank you very much its working and thanks for your quick reply.