kfiross / flutter_holo_date_picker

A Flutter package of datepicker like Holo Theme in Android
MIT License
61 stars 77 forks source link

Weekday error #16

Closed jnheo-md closed 3 years ago

jnheo-md commented 3 years ago

Hi, I love the flutter_holo_date_picker and use it for multiple projects.

However, while trying to display date format of : "MM-dd(E)", widget crashes showing

RangeError (index): Invalid value: Not in inclusive range 0..6: 7

I was using DatePickerWidget with locale unset(to default).

Here's my full code for the widget

DatePickerWidget(
   looping: false, 
   firstDate: DateTime(2020, 1, 1),
   lastDate: DateTime.now(),
   initialDate: DateTime.now(),
   dateFormat: "MM-dd(E)",
   onChange: (DateTime newDate, _) =>_selectedDate = newDate,
   pickerTheme: DateTimePickerTheme(
      itemTextStyle:TextStyle(color: Colors.white, fontSize: 19),
      showTitle: false,
   ),
),

Thanks for everything!

kfiross commented 3 years ago

Hi, thanks for the support! I will try to fix the issue

kfiross commented 3 years ago

@jnheo-md I think I solved it, update will uploaded soon

jnheo-md commented 3 years ago

@jnheo-md I think I solved it, update will uploaded soon

Really?! What a quick response! I never expected for this to be fixed so quickly! THANKS ALOT!! GREAT WORK!