{"id":15068055,"url":"https://github.com/dna-intricate/imguidatepicker","last_synced_at":"2025-04-10T16:13:30.109Z","repository":{"id":251603742,"uuid":"835387943","full_name":"DnA-IntRicate/ImGuiDatePicker","owner":"DnA-IntRicate","description":"A custom date-picker widget for Dear ImGui","archived":false,"fork":false,"pushed_at":"2025-02-05T08:26:41.000Z","size":448,"stargazers_count":13,"open_issues_count":1,"forks_count":3,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-24T14:05:23.813Z","etag":null,"topics":["cplusplus","dateedit","dateentry","datepicker","daterangepicker","imgui","imgui-addon","immediate-gui","tools","ui"],"latest_commit_sha":null,"homepage":"","language":"C++","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/DnA-IntRicate.png","metadata":{"files":{"readme":"README.md","changelog":null,"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}},"created_at":"2024-07-29T18:21:46.000Z","updated_at":"2025-03-09T21:52:15.000Z","dependencies_parsed_at":null,"dependency_job_id":"92b09ae0-c10d-4b11-b9d5-8c0178e905cb","html_url":"https://github.com/DnA-IntRicate/ImGuiDatePicker","commit_stats":{"total_commits":11,"total_committers":1,"mean_commits":11.0,"dds":0.0,"last_synced_commit":"aeb6d2d7d1a4374e5cf5ae68f780c673160e4d59"},"previous_names":["dna-intricate/imguidatepicker"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DnA-IntRicate%2FImGuiDatePicker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DnA-IntRicate%2FImGuiDatePicker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DnA-IntRicate%2FImGuiDatePicker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DnA-IntRicate%2FImGuiDatePicker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DnA-IntRicate","download_url":"https://codeload.github.com/DnA-IntRicate/ImGuiDatePicker/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248251511,"owners_count":21072689,"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":["cplusplus","dateedit","dateentry","datepicker","daterangepicker","imgui","imgui-addon","immediate-gui","tools","ui"],"created_at":"2024-09-25T01:30:08.301Z","updated_at":"2025-04-10T16:13:30.078Z","avatar_url":"https://github.com/DnA-IntRicate.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ImGuiDatePicker\nImGuiDatePicker is a custom calendar-style date-picker widget for [Dear ImGui](https://github.com/ocornut/imgui) written in `C++20` that can easily be compiled alongside `ImGui` by adding the header and source files to your `ImGui` project.\n\n![DemoGif](Images/DemoGif.gif)\nFont used: [Open Sans](https://fonts.google.com/specimen/Open+Sans)\n\nImGuiDatePicker uses the `tm` struct for working with dates:\n``` C++\nstruct tm\n{\n    int tm_sec;   // seconds after the minute - [0, 60] including leap second\n    int tm_min;   // minutes after the hour - [0, 59]\n    int tm_hour;  // hours since midnight - [0, 23]\n    int tm_mday;  // day of the month - [1, 31]\n    int tm_mon;   // months since January - [0, 11]\n    int tm_year;  // years since 1900\n    int tm_wday;  // days since Sunday - [0, 6]\n    int tm_yday;  // days since January 1 - [0, 365]\n    int tm_isdst; // daylight savings time flag\n};\n```\n## Including\n`IMGUI_DATEPICKER_YEAR_MIN` and `IMGUI_DATEPICKER_YEAR_MAX` should be defined before including [ImGuiDatePicker.hpp](ImGuiDatePicker.hpp). If they are not defined, they will default to `1900` and `3000` respectively.\n``` C++\n// Define the lowest year that the picker can select. In this example, '1970' is the Unix epoch.\n#define IMGUI_DATEPICKER_YEAR_MIN 1970\n// Define the highest year that the picker can select.\n#define IMGUI_DATEPICKER_YEAR_MAX 3000\n#include \u003cImGuiDatePicker.hpp\u003e\n```\n## Usage\n``` C++\n// Get today's date and store it in a 'tm' struct named 't'\nstd::chrono::system_clock::time_point now = std::chrono::system_clock::now();\nstd::time_t currentTime = std::chrono::system_clock::to_time_t(now);\ntm t = *std::gmtime(\u0026currentTime);\n\n// Use the picker\nif (ImGui::DatePicker(\"Date\", t))\n{\n    // Perform some event whenever the date 't' is changed\n}\n```\nAn `alt font` can also be supplied to the picker by calling `DatePickerEx`. This `alt font` will be used for the picker's days-of-the-week headers and for the month-picker combo box.\n``` C++\nImFont* boldFont = GetBoldFontFromSomewhere();\ntm t = GetTmFromSomewhere();\nImGui::DatePickerEx(\"Date\", t, boldFont);\n```\n![AltFontDemoImage](Images/AltFontDemoImage.png)\n\n## License\nImGuiDatePicker is licensed under the MIT License. See [LICENSE](LICENSE).\n\n```\nMIT License\n\nCopyright (c) 2024 Adam Foflonker\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdna-intricate%2Fimguidatepicker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdna-intricate%2Fimguidatepicker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdna-intricate%2Fimguidatepicker/lists"}