how to change calendar time to jalali(persian)

Viewed 203

i am using syncfusion as a calendar package and i want to change its time to jalali(persian) how i am gonna do that? i already tried localization but that only changed the language ,

1 Answers

As mentioned here, syncfusion does not support jalali calendar. You can try to change the package with jalali_calendar.


import 'package:jalali_calendar/jalali_calendar.dart';

Future _selectDate() async {
    String picked = await jalaliCalendarPicker(context: context); // نمایش خروجی به صورت شمسی
   //  await jalaliCalendarPicker(context: context,convertToGregorian: true); // نمایش خروجی به صورت میلادی
    if (picked != null) setState(() => _value =picked.toString());
    print(_value);
  }

Related