{"id":21824546,"url":"https://github.com/gantonious/materialdaypicker","last_synced_at":"2025-04-14T05:14:50.594Z","repository":{"id":55153221,"uuid":"109523818","full_name":"gantonious/MaterialDayPicker","owner":"gantonious","description":"An elegant day of the week picker inspired by Google's clock app","archived":false,"fork":false,"pushed_at":"2021-01-06T16:02:57.000Z","size":2520,"stargazers_count":60,"open_issues_count":6,"forks_count":11,"subscribers_count":2,"default_branch":"dev","last_synced_at":"2025-04-14T05:14:34.985Z","etag":null,"topics":["android","android-clock","android-library","contributions-welcome","day-of-the-week-picker","day-picker","google-clock","library","material-design","picker","ui-components"],"latest_commit_sha":null,"homepage":"","language":"Kotlin","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/gantonious.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-11-04T19:25:36.000Z","updated_at":"2024-12-13T21:10:59.000Z","dependencies_parsed_at":"2022-08-14T13:40:25.372Z","dependency_job_id":null,"html_url":"https://github.com/gantonious/MaterialDayPicker","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gantonious%2FMaterialDayPicker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gantonious%2FMaterialDayPicker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gantonious%2FMaterialDayPicker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gantonious%2FMaterialDayPicker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gantonious","download_url":"https://codeload.github.com/gantonious/MaterialDayPicker/tar.gz/refs/heads/dev","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248824693,"owners_count":21167345,"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":["android","android-clock","android-library","contributions-welcome","day-of-the-week-picker","day-picker","google-clock","library","material-design","picker","ui-components"],"created_at":"2024-11-27T17:59:04.993Z","updated_at":"2025-04-14T05:14:50.572Z","avatar_url":"https://github.com/gantonious.png","language":"Kotlin","readme":"# MaterialDayPicker\n\n[![CircleCI](https://circleci.com/gh/gantonious/MaterialDayPicker.svg?style=svg)](https://circleci.com/gh/gantonious/MaterialDayPicker) [![Download](https://api.bintray.com/packages/gantonious/maven/materialdaypicker/images/download.svg)](https://bintray.com/gantonious/maven/materialdaypicker/_latestVersion)\n\n\nInspired by the day picker in the builtin Android clock app.\n\n**Note:** I'm not actively working on new features for this library. I'm only addressing critical bugs. With that being said contributions for new features are more than welcome and I am available to review pull requests. See [contributing.md](https://github.com/gantonious/MaterialDayPicker/blob/dev/CONTRIBUTING.md) if you're interested in contributing.\n\n|Normal Usage|Localized Usage|Dark Mode Usage|\n|---|---|---|\n|![Default Usage](screenshots/default_usage.gif)|![Localized Usage](screenshots/localized_usage.gif)|![Dark Mode Usage](screenshots/dark_mode_usage.gif)|\n\n## Features\n- 🎨 Customizable theming\n- ✅ Easy to use API/hooks\n- 🌎 Fully localized\n- 👻 Supports dark mode\n\n## What's New: Version 0.7.4 - Better Configuration + Bug fixes\n\n- You can now manually override the first day of the week shown in the picker by using the newly added `firstDayOfWeek` property\n\n### Changes from 0.7.3\n\n- Upgraded MaterialDayPicker to target API 30 and upgraded its AndroidX dependencies\n\n### Changes from 0.7.2\n\n**Bug fixes**\n- Fixes a bug when using android gradle plugin `3.6.1` that would cause building to fail due to not being able to find the `selectionMode` attribute.\n\n### Changes from 0.7.1\n\n**Bug fixes**\n- Fixes an issue where calling `setSelectedDays` would cause selected days to flash off and on.\n\n### Changes from 0.7.0\n\n**Configuration Improvements**\n- You can now enable/disable days from being selected using enableDay/disableDay methods. See more below.\n- You can now set the selection mode via xml by using the `app:selectionMode` attribute.\n\nDownload the latest version by adding the following to your project's `build.gradle` file:\n\n```groovy\ndependencies {\n    implementation 'ca.antonious:materialdaypicker:0.7.4'\n}\n```\n\n## Using MaterialDayPicker in your App\n\nYou can just drop the view into your existing xml:\n\n```xml\n\u003cca.antonious.materialdaypicker.MaterialDayPicker\n    android:id=\"@+id/day_picker\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"wrap_content\"/\u003e\n```\n\nYou can get the currently selected days by using:\n\n```kotlin\nval selectedDays = materialDayPicker.selectedDays\n// returns [MaterialDayPicker.Weekday.TUESDAY, MaterialDayPicker.Weekday.FRIDAY]\n```\n\nYou can set the selected days by doing:\n\n```kotlin\nval daysToSelect = listOf(MaterialDayPicker.Weekday.TUESDAY, MaterialDayPicker.Weekday.FRIDAY)\nmaterialDayPicker.setSelectedDays(daysToSelect)\n```\n\nIf you want to only allow one day to be selected at a time you can do:\n\n```kotlin\nmaterialDayPicker.selectionMode = SingleSelectionMode.create()\n```\n\nThis can also be set via xml using the `selectionMode` attribute:\n\n```xml\n\u003cca.antonious.materialdaypicker.MaterialDayPicker\n    ...\n    app:selectionMode=\"ca.antonious.materialdaypicker.SingleSelectionMode\"/\u003e\n```\n\nYou can enable/disable days using the following methods. Note if you disable a day when it's selected it cannot be deselected:\n\n```kotlin\nmaterialDayPicker.enableDay(MaterialDayPicker.Weekday.Monday)\nmaterialDayPicker.disableDay(MaterialDayPicker.Weekday.Monday)\nmaterialDayPicker.setDayEnable(MaterialDayPicker.Weekday.Monday, isEnabled = false)\n```\n\nIf you want to listen to whenever the day selection is changed you can use:\n\n```kotlin\nmaterialDayPicker.setDaySelectionChangedListener { selectedDays -\u003e\n    // handle selection change\n}\n```\n\nIf you need to know when a specific day is selected/deselected you can use:\n\n\n```kotlin\nmaterialDayPicker.setDayPressedListener { weekday, isSelected -\u003e\n    // handle weekday selection\n}\n```\n\n## Customizing MaterialDayPicker for your App\n\nYou can override these colors to change how MaterialDayPicker looks. You can also update these values in your night color resources directory to update how MaterialDayPicker looks in dark mode:\n\n```xml\n\u003ccolor name=\"dayPressed\"\u003e@color/colorPrimaryDark\u003c/color\u003e\n\u003ccolor name=\"daySelected\"\u003e@color/colorPrimary\u003c/color\u003e\n\u003ccolor name=\"daySelectedTextColor\"\u003e@android:color/white\u003c/color\u003e\n\u003ccolor name=\"dayDeselected\"\u003e#FAFAFA\u003c/color\u003e\n\u003ccolor name=\"dayDeselectedTextColor\"\u003e@android:color/black\u003c/color\u003e\n\n\u003c!-- Customizing colors for disabled days--\u003e\n\u003ccolor name=\"daySelectedAndDisabled\"\u003e#43444F\u003c/color\u003e\n\u003ccolor name=\"daySelectedAndDisabledTextColor\"\u003e@color/daySelectedTextColor\u003c/color\u003e\n\u003ccolor name=\"dayDeselectedAndDisabled\"\u003e@color/dayDeselected\u003c/color\u003e\n\u003ccolor name=\"dayDeselectedAndDisabledTextColor\"\u003e@android:color/darker_gray\u003c/color\u003e\n```\n\nIf you don't want to use the device's current locale you can override it by doing:\n\n```kotlin\nmaterialDayPicker.locale = Locale.ENGLISH // or any other locale\n```\n\nIf you want to specify the first day of the week explicitly:\n\n```kotlin\nmaterialDayPicker.firstDayOfWeek = MaterialDayPicker.Weekday.MONDAY // or any other day\n```\n\n## License\n\n```\nMIT License\n\nCopyright (c) 2017 George Antonious\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","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgantonious%2Fmaterialdaypicker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgantonious%2Fmaterialdaypicker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgantonious%2Fmaterialdaypicker/lists"}