{"id":28465121,"url":"https://github.com/maxverwiebe/ctkdatepicker","last_synced_at":"2025-06-30T19:31:35.924Z","repository":{"id":251766904,"uuid":"838349626","full_name":"maxverwiebe/CTkDatePicker","owner":"maxverwiebe","description":"CustomTkinter Calendar Date Picker ","archived":false,"fork":false,"pushed_at":"2025-03-28T20:55:57.000Z","size":16,"stargazers_count":14,"open_issues_count":2,"forks_count":3,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-07T05:11:30.246Z","etag":null,"topics":["calendar","ctk","customtkinter","date","element","form","gui","picker"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/maxverwiebe.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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}},"created_at":"2024-08-05T13:11:06.000Z","updated_at":"2025-05-19T09:41:46.000Z","dependencies_parsed_at":"2025-03-28T21:28:04.150Z","dependency_job_id":"a5ee56d1-3a34-4aec-a028-aea65dbf3624","html_url":"https://github.com/maxverwiebe/CTkDatePicker","commit_stats":null,"previous_names":["maxverwiebe/ctkdatepicker"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/maxverwiebe/CTkDatePicker","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxverwiebe%2FCTkDatePicker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxverwiebe%2FCTkDatePicker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxverwiebe%2FCTkDatePicker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxverwiebe%2FCTkDatePicker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/maxverwiebe","download_url":"https://codeload.github.com/maxverwiebe/CTkDatePicker/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxverwiebe%2FCTkDatePicker/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262838103,"owners_count":23372470,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["calendar","ctk","customtkinter","date","element","form","gui","picker"],"created_at":"2025-06-07T05:10:56.143Z","updated_at":"2025-06-30T19:31:35.915Z","avatar_url":"https://github.com/maxverwiebe.png","language":"Python","readme":"# CTkDatePicker\n\nCTkDatePicker is a custom date picker widget built using the CustomTkinter library. It provides a user-friendly interface for selecting dates, with both a text entry and a calendar popup for easy date selection.\n\n![grafik](https://github.com/user-attachments/assets/d51430c3-aea1-49bf-b790-550c58902773)\n\n\n## Features\n\n- **Customizable Date Format**: Set the date format to display in the date entry.\n- **Calendar Popup**: Provides a visual calendar for selecting dates.\n- **Manual Date Entry**: Optionally allow users to manually enter a date.\n- **Previous and Next Month Navigation**: Easily navigate between months.\n\n## Installation\n\nTo use CTkDatePicker, you need to have CustomTkinter installed. You can install it using pip:\n\n```bash\npip install customtkinter\n```\n\n## Usage\n\n### Basic Example\n\nHere's a basic example of how to use CTkDatePicker in your application:\n\n```python\nimport tkinter as tk\nimport customtkinter as ctk\nfrom CTkDatePicker import CTkDatePicker\n\ndef main():\n    root = ctk.CTk()\n    root.geometry(\"400x300\")\n    \n    date_picker = CTkDatePicker(root)\n    date_picker.set_allow_change_month(False)\n    date_picker.set_change_months(\"sub\", 5)\n    date_picker.pack(pady=20)\n\n    def print_date():\n        print(f\"Selected Date: {date_picker.get_date()}\")\n\n    btn = ctk.CTkButton(root, text=\"Print Date\", command=print_date)\n    btn.pack(pady=20)\n    \n    root.mainloop()\n\nif __name__ == \"__main__\":\n    main()\n```\n\n### Customization\n\n- **Date Format**: You can set the date format using the `set_date_format` method.\n\n  ```python\n  date_picker.set_date_format(\"%d-%m-%Y\")\n  ```\n\n- **Language**: You can set the language for days and months using the `set_localization` method.\n\n  ```python\n  date_picker.set_localization(\"en_EN\")\n  ```\n\n- **Allow Manual Input**: Enable or disable manual date input using the `set_allow_manual_input` method.\n\n  ```python\n  date_picker.set_allow_manual_input(True)  # Enable\n  date_picker.set_allow_manual_input(False) # Disable\n  ```\n\n## Methods\n\n### `set_date_format(date_format)`\n\n- **Description**: Set the date format to be used in the date entry.\n- **Parameters**: \n  - `date_format` (str): The desired date format string, e.g., \"%m/%d/%Y\".\n\n### `set_localization(localization)`\n\n- **Description**: Set the localization for month and day names.\n- **Parameters**: \n  - `localization` (str): The desired localization string, e.g., \"en_EN\".\n\n### `open_calendar()`\n\n- **Description**: Open the calendar popup for date selection.\n\n### `build_calendar()`\n\n- **Description**: Build and display the calendar in the popup.\n\n### `prev_month()`\n\n- **Description**: Navigate to the previous month in the calendar.\n\n### `next_month()`\n\n- **Description**: Navigate to the next month in the calendar.\n\n### `select_date(day)`\n\n- **Description**: Select a date from the calendar.\n- **Parameters**: \n  - `day` (int): The day of the month selected by the user.\n\n### `get_date()`\n\n- **Description**: Get the currently selected date as a string.\n- **Returns**: \n  - `str`: The date string in the format specified by `self.date_format`.\n\n### `set_allow_manual_input(value)`\n\n- **Description**: Enable or disable manual date input.\n- **Parameters**: \n  - `value` (bool): If True, manual input in the date entry is allowed; otherwise, it is disabled.\n\n### `set_allow_change_month(value)`\n\n- **Description**: Enable or disable change month.\n- **Parameters**: \n  - `value` (bool): If False, user cannot change month in the calendar.\n\n### `set_change_months(value)`\n\n- **Description**: Add or subract number of months when opening the calendar.\n- **Parameters**: \n  - `add_or_sub` (str): Either \"add\" or \"sub\".\n  - `value` (int): Number of months.\n\n## Contributing\n\nContributions are welcome! Please fork the repository and submit a pull request with your improvements.\n\n## License\n\nThis project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.\n\n## Acknowledgments\n\n- [CustomTkinter](https://github.com/TomSchimansky/CustomTkinter) for providing a great framework for creating modern and customizable GUI applications in Python.\n\nFeel free to customize this README to better suit your project's specific details and needs!\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaxverwiebe%2Fctkdatepicker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmaxverwiebe%2Fctkdatepicker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaxverwiebe%2Fctkdatepicker/lists"}