패키지, 저장소 및 앱 카테고리 검색

패키지 상세v1.3.5

jalali_table_calendar

테이블 캘린더, 날짜 패커, 날짜 선택기 및 휴일 포함 페르시아 날짜(Jalali/Shamsi 날짜) 변환기

AndroidiOSLinuxmacOSWebWindows
30일 다운로드
63
좋아요
27
Pub 점수
150

패키지 설치

flutter pub add jalali_table_calendar

패키지 개요

공개 정보를 바탕으로 생성한 선택 가이드입니다.

페르시아어(자라리/샴시) 날짜를 위한 테이블 기반 캘린더를 제공하는 플러터 패키지로, 날짜 선택, 날짜 패킹, 자라리와 그레고리력 간의 변환 기능을 포함합니다. 공휴일 지원과 함께 페르시아어 사용자를 대상으로 한 애플리케이션에 최적화되어 있습니다. 안드로이드, iOS, 리눅스, 맥OS, 웹, 윈도우 플랫폼에서 원활하게 통합되며 일관된 UI 경험을 제공합니다. 날짜 조작 및 공휴일 표시를 위한 내장 유틸리티를 통해 플러터 앱에서 자라리 날짜를 쉽게 처리할 수 있도록 합니다.

사용 사례

  • 페르시아 달력 통합
  • 자랄리 형식으로 날짜 선택
  • 자라이리-그레고리오력 날짜 변환
  • 휴일 인식 날짜 표시
  • 이란 사용자를 위한 캘린더 기반 스케줄링
  • 다중 플랫폼 날짜 선택기

주요 기능

  • 자랄리(샴시) 날짜 지원
  • 내장된 휴일 감지
  • 그레고리력에서 자라리력으로의 변환
  • 날짜 선택 위젯
  • 테이블 레이아웃 캘린더
  • 크로스 플랫폼 호환성

적합한 대상

  • 이란 사용자를 위한 앱
  • 페르시아 날짜를 갖춘 교육 도구
  • 페르시아력으로 이벤트 기획
  • 샤미시 날짜를 사용하는 금융 또는 법적 시스템
  • 페르시아 날짜 처리가 필요한 개발자

고려 사항

  • 이란력 시스템에 대한 이해가 필요합니다
  • 페르시아 날짜 형식에만 제한됨
  • 페르시아어 이외의 로케일에 맞춤 스타일이 필요할 수 있습니다
  • 정확한 공휴일 데이터에 의존
  • 비페르시아 날짜 시스템에는 적합하지 않습니다

원본 README

연결된 소스 저장소의 README 원문 스냅샷입니다. 최신 내용은 저장소에서 확인하세요.

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

Modified and Completed Version of jalali_calendar package



New Features (Range Selection)

to use date range selector you must pass isRange:true

for set First date of range you should hold on day by default first date is the current date

isRange: true,
onRangeChanged: (DateTime start, DateTime end) {
  print(start);
  print(end);
}

Usage

Import this line in Flutter pubspec.yaml

jalali_table_calendar: ^1.3.5

To Use Calendar Or DatePicker , Import this line to your dart file

import 'package:jalali_table_calendar/jalali_table_calendar.dart';

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){
return Positioned(
top: -4,
left: 0,
child: Container(
decoration: BoxDecoration(
color: Theme.of(context).textSelectionColor,
shape: BoxShape.circle),
padding: const EdgeInsets.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 = await jalaliCalendarPicker(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 = await jalaliCalendarPicker(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

Full date Picker Sample

    DatePicker.showDatePicker(
context,
minYear: 1300,
maxYear: 1450,
confirm: Text(
'Confirm',
style: TextStyle(color: Colors.red),
),
cancel: Text(
'Cancel',
style: TextStyle(color: Colors.cyan),
),
dateFormat: _format,
onChanged: (year, month, day) {
if (!showTitleActions) {
_changeDatetime(year, month, day);
}
},
onConfirm: (year, month, day) {
_changeDatetime(year, month, day);
_valuePiker = " Full date : $_datetime  \n year : $year \n  Month  :   $month \n  day :  $day";
}
)

void _changeDatetime(int year, int month, int day) {
setState(() {
_datetime = '$year-$month-$day';
});
}

To use date Converter you can follow this sample

first import this library to your code

import 'package:persian_date/persian_date.dart';

Full Date Converter Sample

PersianDate pDate = PersianDate(gregorian: "1989-01-29");
print("Now ${pDate.getDate}");

PersianDate persianDate = PersianDate();
print("Now ${persianDate.now}");
print(persianDate.hour);
print("year ${persianDate.year}");
print("isHoliday ${persianDate.isHoliday}");
print("isHoliday ${persianDate.weekdayname}");
print(persianDate.monthname); // نام ماه
print(persianDate.month); // ماه
print(persianDate.day); // روز
print(persianDate.hour);// ساعت
print(persianDate.minute);// دقیقه
print(persianDate.second);// ثانیه
print(persianDate.millisecond); // میلی ثانیه
print(persianDate.microsecond);//


print("Parse Gregorian To Jalali ${persianDate.gregorianToJalali("2019-02-20T00:19:54.000Z","yyyy-m-d hh:nn")}");
print("Parse Jalali To Gregorian ${persianDate.jalaliToGregorian("1368-05-30 19:54", "yyyy-m-d hh:nn")}");

those formats are supported in date converter

   `"2012-02-27 13:27:00"`
`"2012-02-27 13:27:00.123456z"`
`"2012-02-27 13:27:00,123456z"`
`"20120227 13:27:00"`
`"20120227T132700"`
`"20120227"`
`"+20120227"`
`"2012-02-27T14Z"`
`"2012-02-27T14+00:00"`
`"-123450101 00:00:00 Z"`: in the year -12345.
`"2002-02-27T14:00:00-0500"`: Same as `"2002-02-27T19:00:00Z"`
Format operation Format operation
yyyy return year with Four number hh hours with two number
yy return year with two number h hours with one number
mm return month with two number HH hours with two number in 24
m return month with one number H hours with one number in 24
MM the month name with full letter nn minut with two number
M the month name with short form n minut with one number
dd the day with two number ss Second with two number
d the day with one number s Second with one number
w week number SS show milliSecond
DD the day name with full letter S show milliSecond
D the day name with short form uuu show microsecond
am Show time in short u show microsecond
AM Show full time . .

bug report and suggestions

if you have any issue or any suggestion you could contact a.zare.developer@gmail.com or j.zobeidi89@gmail.com author of jalali_calendar package

카테고리

의존성

의존성 목록 1 개

소스 저장소

이 패키지를 사용하는 프로젝트

아직 데이터가 없습니다.