Package selection guidance compiled from public package information, community data, and project usage.
A Flutter package providing a table-based calendar for Persian (Jalali/Shamsi) dates, featuring date picking, date packing, and conversion between Jalali and Gregorian calendars. It supports holidays and is designed for applications targeting Persian-speaking users. The package integrates seamlessly across Android, iOS, Linux, macOS, Web, and Windows platforms, offering a consistent UI experience. It simplifies handling of Jalali dates in Flutter apps with built-in utilities for date manipulation and holiday marking.
Use cases
Persian calendar integration
Date selection in Jalali format
Jalali-Gregorian date conversion
Holiday-aware date display
Calendar-based scheduling for Iranian users
Multi-platform date picker
Key features
Jalali (Shamsi) date support
Built-in holiday detection
Gregorian to Jalali conversion
Date picker widget
Table layout calendar
Cross-platform compatibility
Suitable for
Apps for Iranian users
Educational tools with Persian dates
Event planning with Jalali calendar
Financial or legal systems using Shamsi dates
Developers needing Persian date handling
Considerations
Requires understanding of Jalali calendar system
Limited to Persian date formats
May need custom styling for non-Persian locales
Depends on accurate holiday data
Not suitable for non-Persian date systems
Original README
Original README snapshot from the linked source repository. Visit the repository for the latest content.
New Package
This Package will receive updates no more use this package instead jalali_calendar_plus
این پکیج دیگر آپدیت نمیشود و به جای این از پکیج مقابل استفاده کنید jalali_calendar_plus
jalali Table Calendar
if you have any issue or any suggestion you could contact a
Calendar , DatePicker and Date Converter For Persian Date(Jalali/Shamsi date) with holidays
To Use date Converter , Import this line to your dart file
import'package:persian_date/persian_date.dart';
After import library, to show the calendar you can use JalaliCalendar or jalaliCalendarPicker() method , on the constructor context is important
Important
its' highly recommended to wrap widget in Flexible() widget in non list widgets because this widget fill screen automatically.
This sample make a Calendar Widget
DateTime today = DateTime.now();
JalaliCalendar(
context: context,
// add the events for each day
events: {
DateTime(2021,4,15):['sample event',66546],
today: ['sample event'],
today.add(Duration(days: 1)): [6, 5, 465, 1, 66546],
today.add(Duration(days: 2)): [6, 5, 465, 66546],
},
//make marker for every day that have some events
marker: (date,events){
returnPositioned(
top: -4,
left: 0,
child: Container(
decoration: BoxDecoration(
color: Theme.of(context).textSelectionColor,
shape: BoxShape.circle),
padding: constEdgeInsets.all(6.0),
child: Text(events.length.toString()),
),
);
},
onDaySelected: (date) {
print(date);
}),
This sample return the selected date as Jalali(شمسی)
if you want to return the selected date to Gregorian, on the constructor set the convertToGregorian to true
Future_selectDate() async {
String picked = awaitjalaliCalendarPicker(context: context); // نمایش خروجی به صورت شمسی// await jalaliCalendarPicker(context: context,convertToGregorian: true); // نمایش خروجی به صورت میلادیif (picked != null) setState(() => _value =picked.toString());
print(_value);
}
This sample return the selected date as Gregorian(میلادی)
Future_selectDate() async {
String picked = awaitjalaliCalendarPicker(context: context,convertToGregorian: true); // نمایش خروجی به صورت میلادیif (picked != null) setState(() => _value =picked.toString());
print(_value);
}
Those parameters using To Show the TimePicker
Parameter
operation
showTimePicker
To show TimePicker set it true
hore24Format
To return time in 24 hours format set it true
initialTime
To set initial time use it with TimeOfDay
To use datePicker you can follow this sample
To show DatePicker those parameters is required
minYear // min date this required for the start year in Jalali
maxYear // max date this required for the last year in jalali
confirm and cancel // widget for show text
_format // for returning date like String _format = 'yyyy-mm-dd';
onChanged // return date when the user changes the date
onConfirm // return date when the user click confirm
For set, default date use those parameters
initialYear => for year
initialMonth => for month
initialDay => for day