- Notifications
You must be signed in to change notification settings - Fork 216
Description
Describe the bug
the JumpToSelection() function takes the time into consideration causing offset values to change during different times.
To Reproduce
Create a startDate to be of the format "YYYY-MM-DD 00:00:00"
select initialSelectedDate as DateTime.now()
over the course of the day, on calling the JumpToSelection() for the first time via a separate button, the timeline will jump from to the date +1 value ( ex: if today is may 11th, JumpToSelection() will jump to May 12th after a period of the day has passed)
Expected behavior
A clear and concise description of what you expected to happen.
on initial jump, the timeline should jump to the initialSelectedDate Value
Screenshots
If applicable, add screenshots to help explain your problem.
also, this weird thing happens, I'm not sure why :
Additional context
Add any other context about the problem here.
code used by me :
DateTime _selectedDate = DateTime.now(); . . . DatePickerController _dpc = new DatePickerController(); . . . DatePicker( _startDate, controller: _dpc, initialSelectedDate: _selectedDate, width: Size_Config.blockSizeHorizontal * 15, height: Size_Config.blockSizeVertical * 12, monthTextStyle: TextStyle( fontFamily: 'Montserrat', color: Colors.white54, fontSize: Size_Config.blockSizeHorizontal * 3), dateTextStyle: TextStyle( fontFamily: 'MontSerrat', fontSize: Size_Config.blockSizeHorizontal * 5, fontWeight: FontWeight.bold, color: Colors.white54), dayTextStyle: TextStyle( fontFamily: 'Montserrat', color: Colors.white54, fontSize: Size_Config.blockSizeHorizontal * 3), onDateChange: (date) { _pc.open(); setState(() { _selectedDate = date; }); }, ), . . . IconButton( onPressed: () { _dpc.animateToSelection(); }, icon: Icon(CustomIcons.filter), color: Colors.white54, //iconSize: 40, ), 
