A Flutter persian datetime picker inspired by material datetime picker

persian-datetime-picker

A persian (farsi,shamsi) datetime picker for flutter, inspired by material datetime picker.

You can pick date / range date / time / date and time.

Screenshots

Usage

Add it to your pubspec.yaml file:


dependencies:

persian_datetime_picker: version

In your library add the following import:


import  'package:persian_datetime_picker/persian_datetime_picker.dart';

Here is an example how to use:

Jalali picked = await showPersianDatePicker(
    context: context,
    initialDate: Jalali.now(),
    firstDate: Jalali(1385, 8),
    lastDate: Jalali(1450, 9),
);
var label = picked.formatFullDate();

var picked = await showTimePicker(
  context: context,
  initialTime: TimeOfDay.now(),
);
var label = picked.persianFormat(context);

GitHub

https://github.com/M-amir-M/persian-datetime-picker