{"id":51529071,"url":"https://github.com/AliAminiCode/flet-persian-datepicker","last_synced_at":"2026-07-27T23:00:34.033Z","repository":{"id":309985232,"uuid":"1038269301","full_name":"AliAminiCode/flet-persian-datepicker","owner":"AliAminiCode","description":"Flet Persian DatePicker: Advanced Shamsi/Jalali Date Widget (2025 Release)  Discover a cutting-edge Persian (Shamsi) DatePicker widget designed for Flet, launched in 2025! This powerful Flet Persian DatePicker offers seamless navigation, stunning animations, and full RTL support with Persian numerals, making it ideal for modern Persian apps","archived":false,"fork":false,"pushed_at":"2026-07-23T19:39:11.000Z","size":644,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2026-07-25T09:11:51.363Z","etag":null,"topics":["datepicker","felt-widget","flet","flet-gui","gui","jalali","persian-datepicker","python","shamsi","shamsi-calendar"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/AliAminiCode.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-08-14T22:41:01.000Z","updated_at":"2026-07-23T19:39:15.000Z","dependencies_parsed_at":"2025-08-20T03:52:55.084Z","dependency_job_id":null,"html_url":"https://github.com/AliAminiCode/flet-persian-datepicker","commit_stats":null,"previous_names":["aliamini2009/persian-datepicker","aliaminicode/persian-datepicker","aliaminicode/flet-persian-datepicker"],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/AliAminiCode/flet-persian-datepicker","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AliAminiCode%2Fflet-persian-datepicker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AliAminiCode%2Fflet-persian-datepicker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AliAminiCode%2Fflet-persian-datepicker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AliAminiCode%2Fflet-persian-datepicker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AliAminiCode","download_url":"https://codeload.github.com/AliAminiCode/flet-persian-datepicker/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AliAminiCode%2Fflet-persian-datepicker/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35968098,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-07-20T02:08:10.276Z","status":"online","status_checked_at":"2026-07-27T02:00:06.776Z","response_time":101,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["datepicker","felt-widget","flet","flet-gui","gui","jalali","persian-datepicker","python","shamsi","shamsi-calendar"],"created_at":"2026-07-09T01:00:30.566Z","updated_at":"2026-07-27T23:00:34.010Z","avatar_url":"https://github.com/AliAminiCode.png","language":"Python","funding_links":[],"categories":["Libraries"],"sub_categories":["Community Extensions"],"readme":"# Flet Persian DatePicker\n\n🇬🇧 English · [🇮🇷 فارسی](README.fa.md)\n\nA Persian (Jalali/Shamsi) date picker widget for [Flet](https://flet.dev), built from scratch to match the look and feel of Flet's built-in `DatePicker` while adding full Persian calendar and RTL support.\n\n## Overview\nFlet's built-in `DatePicker` only supports the Gregorian calendar and English text, which makes it unsuitable for Persian-speaking users. This package provides a drop-in alternative with a similar API, built entirely on top of Flet's existing widgets. Key features:\n- **Jalali calendar support**: correct leap-year handling, Persian month and day names, Persian numerals.\n- **Keyboard navigation**: Enter to confirm, Escape to cancel, day/week movement, all disabled automatically while typing in input mode.\n- **Input mode with validation**: type a date directly (Persian or English numerals) with format and range checking.\n- **Light/dark themes** and a configurable year range.\n- Built entirely with Flet's existing widgets, no external UI dependencies.\n\n## Installation\nInstall the package via pip:\n```bash\npip install persian-datepicker\n```\n\n## Quick Start\n```python\nimport flet as ft\nfrom persian_datepicker import PersianDatePicker\n\ndef main(page: ft.Page):\n    datepicker = PersianDatePicker()\n\n    def handle_result(result):\n        if result:\n            print(f\"Selected: {result['formatted_persian']}\")\n\n    datepicker.set_result_callback(handle_result)\n\n    def show_datepicker(e):\n        datepicker.show(page)\n\n    page.add(ft.ElevatedButton(\"Select Date\", on_click=show_datepicker))\n\nft.app(target=main)\n```\nRun this after installing the package to see a basic datepicker with a button to open it. The selected date is printed in Persian format.\n\n## Advanced Usage\n- Set a custom year range: `PersianDatePicker(first_year=1400, last_year=1410)`.\n- Set a default date: `datepicker.set_default_date(jdatetime.date(1404, 6, 1))` — this takes a `jdatetime.date` object, not a string.\n- Open to a specific month/year: `datepicker.show(page, display_year=1403, display_month=6)`.\n- Disable input mode or keyboard support: `PersianDatePicker(enable_input_mode=False, keyboard_support=False)`.\n\nSee `examples/example_basic.py` for all of the options above, and `examples/example_mini_project.py` for a small event-planner app built with the widget.\n\n## Testing\nThis project uses `pytest` to cover the date-math and validation logic (leap years, month/year boundary crossing, input parsing).\n\nInstall the test dependencies and run the suite:\n```bash\npip install -e \".[dev]\"\npytest tests/\n```\n\n## Screenshots\nCheck out the Persian DatePicker in action:\n\n- **Light Mode**:\n\n\u003cdiv align=\"center\"\u003e\n  \u003cimg src=\"screenshots/light_mode_landscape.png\" alt=\"Light Mode\"\u003e\n\u003c/div\u003e\n\n- **Dark Mode**:\n\n\u003cdiv align=\"center\"\u003e\n  \u003cimg src=\"screenshots/dark_mode_landscape.png\" alt=\"Dark Mode\"\u003e\n\u003c/div\u003e\n\n## Changelog\nSee [CHANGELOG.md](CHANGELOG.md) for version history.\n\n## Contribute\nFound a bug? Report it at [https://github.com/AliAminiCode/flet-persian-datepicker/issues](https://github.com/AliAminiCode/flet-persian-datepicker/issues).\nDeveloped by [Ali Amini](mailto:aliamini9728@gmail.com).\nLicensed under the [MIT License](https://github.com/AliAminiCode/flet-persian-datepicker/blob/master/LICENSE).","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FAliAminiCode%2Fflet-persian-datepicker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FAliAminiCode%2Fflet-persian-datepicker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FAliAminiCode%2Fflet-persian-datepicker/lists"}