@@ -60,7 +60,7 @@ class DatePicker extends StatefulWidget {
6060 final int daysCount;
6161
6262 /// Calendar type
63- final DateType dateType ;
63+ final CalendarType calendarType ;
6464
6565 /// Directionality
6666 final TextDirection ? directionality;
@@ -86,7 +86,7 @@ class DatePicker extends StatefulWidget {
8686 this .daysCount = 500 ,
8787 this .onDateChange,
8888 this .locale = "en_US" ,
89- this .dateType = DateType .gregorianDate,
89+ this .calendarType = CalendarType .gregorianDate,
9090 this .directionality,
9191 }) : assert (
9292 activeDates == null || inactiveDates == null ,
@@ -140,7 +140,7 @@ class _DatePickerState extends State<DatePicker> {
140140 @override
141141 Widget build (BuildContext context) {
142142 return Directionality (
143- textDirection: (widget.directionality) ?? ((widget.dateType == DateType .persianDate)
143+ textDirection: (widget.directionality) ?? ((widget.calendarType == CalendarType .persianDate)
144144 ? TextDirection .rtl
145145 : TextDirection .ltr),
146146 child: Container (
@@ -154,11 +154,11 @@ class _DatePickerState extends State<DatePicker> {
154154 // if widget.startDate is null then use the initialDateValue
155155 DateTime date;
156156 DateTime _date = widget.startDate.add (Duration (days: index));
157- switch (widget.dateType ) {
158- case DateType .persianDate:
157+ switch (widget.calendarType ) {
158+ case CalendarType .persianDate:
159159 date = PersianDate .toJalali (_date.year, _date.month, _date.day);
160160 break ;
161- case DateType .gregorianDate:
161+ case CalendarType .gregorianDate:
162162 date = DateTime (_date.year, _date.month, _date.day);
163163 break ;
164164 default :
@@ -192,8 +192,8 @@ class _DatePickerState extends State<DatePicker> {
192192 ? DateUtils .isSameDay (date, _currentDate! )
193193 : false ;
194194 // Return the Date Widget
195- switch (widget.dateType ) {
196- case DateType .gregorianDate:
195+ switch (widget.calendarType ) {
196+ case CalendarType .gregorianDate:
197197 return GregorianDateWidget (
198198 date: date,
199199 monthTextStyle: isDeactivated
@@ -227,7 +227,7 @@ class _DatePickerState extends State<DatePicker> {
227227 });
228228 },
229229 );
230- case DateType .persianDate:
230+ case CalendarType .persianDate:
231231 return PersianDateWidget (
232232 date: date,
233233 monthTextStyle: isDeactivated
0 commit comments