sarbagyastha / nepali_date_picker

Material Style Date Picker with Bikram Sambat(Nepali) Calendar Support. Supports both Android and ios.
BSD 3-Clause "New" or "Revised" License
40 stars 30 forks source link

Nepali font not showing and CalendarDatePicker widget Not working #7

Closed tamu73 closed 4 years ago

tamu73 commented 4 years ago

I want to show a calendar of Nepali font calendar which is not happenning even if i used language parameter in showAdaptiveDatePicker. _selectedDateTime = await showAdaptiveDatePicker( context: context, initialDate: NepaliDateTime.now(), firstDate: NepaliDateTime(2077), lastDate: NepaliDateTime(2090), language: Language.nepali, initialDatePickerMode: DatePickerMode.day, );

Also I want to use calendar in the main display not in a picker(popup) form. For this I used CalendarDatePicker widget which cannot be used. Am I doing wrong or ? Column( mainAxisAlignment: MainAxisAlignment.center, children: [ CalendarDatePicker( initialDate: NepaliDateTime.now(), firstDate: NepaliDateTime(2070), lastDate: NepaliDateTime(2090), onDateChanged: (date) => _selectedDate.value = date, dayBuilder: (dayToBuild) { // Optional return Center( child: Text( '${dayToBuild.day}', style: Theme .of(context) .textTheme .caption, ), ); }, selectedDayDecoration: BoxDecoration( // Optional color: Colors.deepOrange, shape: BoxShape.circle, ), todayDecoration: BoxDecoration( // Optional gradient: LinearGradient( colors: [Colors.yellow, Colors.orange]), shape: BoxShape.circle, ), ), ], ),

sarbagyastha commented 4 years ago

I want to show a calendar of Nepali font calendar which is not happenning even if i used language parameter in showAdaptiveDatePicker.

You can change language like this: NepaliUtils().language = Language.nepali; , before calling showAdaptiveDatePicker

Also I want to use calendar in the main display not in a picker(popup) form. For this I used CalendarDatePicker widget which cannot be used. Am I doing wrong or ?

Just hide CalendarDatePicker from material, or you can add prefix to nepali-date_picker library image