persian_datetime_picker
library
Functions
-
addDaysToDate(Jalali date, int days)
→ Jalali
-
Returns a Jalali with the added number of days and no time set.
-
addMonthsToMonthDate(Jalali monthDate, int monthsToAdd)
→ Jalali
-
Returns a Jalali with the added number of months and truncates any day
and time information.
-
dateOnly(Jalali date)
→ Jalali
-
Returns a Jalali with just the date of the original, but no time set.
-
datesOnly(JalaliRange range)
→ JalaliRange
-
Returns a JalaliRange with the dates of the original without any times set.
-
firstDayOffset(int year, int month)
→ int
-
Computes the offset from the first day of the week that the first day of
the
month
falls on.
-
formatDecimal(int number)
→ String
-
-
formatFullDate(Jalali date)
→ String
-
-
formatHour(TimeOfDay timeOfDay, {bool alwaysUse24HourFormat = false})
→ String
-
-
formatMediumDate(Jalali date)
→ String
-
-
formatMinute(TimeOfDay timeOfDay)
→ String
-
-
formatMonthYear(Jalali date)
→ String
-
-
formatRangeEndDate(MaterialLocalizations localizations, Jalali? startDate, Jalali? endDate, Jalali? currentDate)
→ String
-
Returns an locale-appropriate string to describe the end of a date range.
-
formatRangeStartDate(MaterialLocalizations localizations, Jalali? startDate, Jalali? endDate)
→ String
-
Returns a locale-appropriate string to describe the start of a date range.
-
formatTimeOfDay(TimeOfDay timeOfDay, {bool alwaysUse24HourFormat = false})
→ String
-
-
formatYear(Jalali date)
→ String
-
-
getDaysInMonth(int year, int month)
→ int
-
-
isSameDay(Jalali? dateA, Jalali? dateB)
→ bool
-
Returns true if the two Jalali objects have the same day, month, and
year.
-
isSameMonth(Jalali dateA, Jalali dateB)
→ bool
-
Returns true if the two Jalali objects have the same month, and
year, or are both null.
-
monthDelta(Jalali startDate, Jalali endDate)
→ int
-
Determines the number of months between two Jalali objects.
-
parseCompactDate(String inputString)
→ Jalali
-
-
showPersianDatePicker({required BuildContext context, required Jalali initialDate, required Jalali firstDate, required Jalali lastDate, PDatePickerEntryMode initialEntryMode = PDatePickerEntryMode.calendar, PSelectableDayPredicate? selectableDayPredicate, String? helpText, String? cancelText, String? confirmText, Locale? locale, bool useRootNavigator = true, RouteSettings? routeSettings, TextDirection? textDirection, TransitionBuilder? builder, PDatePickerMode initialDatePickerMode = PDatePickerMode.day, String? errorFormatText, String? errorInvalidText, String fieldHintText = '##/##/####', String fieldLabelText = 'ورود تاریخ'})
→ Future<Jalali?>
-
Shows a dialog containing a Material Design date picker.
-
showPersianDateRangePicker({required BuildContext context, JalaliRange? initialDateRange, required Jalali firstDate, required Jalali lastDate, Jalali? currentDate, PDatePickerEntryMode initialEntryMode = PDatePickerEntryMode.calendar, String? helpText, bool? showEntryModeIcon, String? cancelText, String? confirmText, String? saveText, String? errorFormatText, String? errorInvalidText, String? errorInvalidRangeText, String? fieldStartHintText, String? fieldEndHintText, String? fieldStartLabelText, String? fieldEndLabelText, Locale? locale, bool useRootNavigator = true, RouteSettings? routeSettings, TextDirection? textDirection, TransitionBuilder? builder})
→ Future<JalaliRange?>
-
Shows a full screen modal dialog containing a Material Design date range
picker.
-
showPersianTimePicker({required BuildContext context, required TimeOfDay initialTime, TransitionBuilder? builder, bool useRootNavigator = true, PTimePickerEntryMode initialEntryMode = PTimePickerEntryMode.dial, String cancelText = 'لغو', String confirmText = 'تایید', String helpText = 'انتخاب زمان', RouteSettings? routeSettings})
→ Future<TimeOfDay?>
-
Shows a dialog containing a material design time picker.
-
timeOfDayFormat({bool alwaysUse24HourFormat = false})
→ TimeOfDayFormat
-