{"id":28386043,"url":"https://github.com/twinkle942910/monthyearpicker","last_synced_at":"2025-06-26T13:31:59.172Z","repository":{"id":57723750,"uuid":"94254296","full_name":"Twinkle942910/MonthYearPicker","owner":"Twinkle942910","description":"Fancy year and month picker library for your android app","archived":false,"fork":false,"pushed_at":"2018-09-02T20:29:47.000Z","size":155,"stargazers_count":35,"open_issues_count":8,"forks_count":22,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-30T16:33:38.079Z","etag":null,"topics":["android","calendar","java","library","picker-dialog"],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Twinkle942910.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-06-13T20:22:13.000Z","updated_at":"2024-01-24T21:29:31.000Z","dependencies_parsed_at":"2022-08-25T11:01:46.104Z","dependency_job_id":null,"html_url":"https://github.com/Twinkle942910/MonthYearPicker","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/Twinkle942910/MonthYearPicker","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Twinkle942910%2FMonthYearPicker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Twinkle942910%2FMonthYearPicker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Twinkle942910%2FMonthYearPicker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Twinkle942910%2FMonthYearPicker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Twinkle942910","download_url":"https://codeload.github.com/Twinkle942910/MonthYearPicker/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Twinkle942910%2FMonthYearPicker/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262076717,"owners_count":23255055,"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","calendar","java","library","picker-dialog"],"created_at":"2025-05-30T13:08:54.192Z","updated_at":"2025-06-26T13:31:59.162Z","avatar_url":"https://github.com/Twinkle942910.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# MonthYearPicker\nFancy year and month picker library for your android app\n\n## How to use?\n### Maven\n\n```Maven\n\u003cdependency\u003e\n  \u003cgroupId\u003ecom.github.twinkle942910\u003c/groupId\u003e\n  \u003cartifactId\u003emonthyearpicker\u003c/artifactId\u003e\n  \u003cversion\u003e0.0.1\u003c/version\u003e\n  \u003ctype\u003eaar\u003c/type\u003e\n\u003c/dependency\u003e\n```\n\n### Gradle\n\n```Gradle\ndependencies {\n    compile 'com.github.twinkle942910:monthyearpicker:0.0.1'\n}\n```\n\n## Demonstration\n\n| And you can pick a year  | You can pick a month |\n| ------------------------ | -------------------- |\n| \u003cimg src=\"https://preview.ibb.co/mxCCOQ/933df630_0f78_486a_bed0_ae19d318c2d0.jpg\" width=\"180\" height=\"320\"\u003e  | \u003cimg src=\"https://preview.ibb.co/enesOQ/6d12ae79_7fd6_46de_8075_1771df030571.jpg\" width=\"180\" height=\"320\"\u003e  |\n\n## You can simply create your dialog in code, using next lines\n\n```Java\nCalendar calendar = Calendar.getInstance();\ncalendar.set(2010,01,01);\n\nYearMonthPickerDialog yearMonthPickerDialog = new YearMonthPickerDialog(this, calendar, new YearMonthPickerDialog.OnDateSetListener() {\n            @Override\n            public void onYearMonthSet(int year, int month) {\n                Calendar calendar = Calendar.getInstance();\n                calendar.set(Calendar.YEAR, year);\n                calendar.set(Calendar.MONTH, month);\n\n                SimpleDateFormat dateFormat = new SimpleDateFormat(\"MMMM yyyy\");\n\n                yearMonth.setText(dateFormat.format(calendar.getTime()));\n            }\n        });\n```\n1st argument - Context.\n\n2nd - Calendar.\n\n3nd - Date set listener.\n\n### And after this just show it whenever you need it to appear.\n\n```Java\nyearMonthPickerDialog.show();\n  ```\n## If you want to add your style then add themeId to the constructor as a third argument\nfor exemple:\n\nAdd your custom style to android resources\n\n```XML\n   \u003c!-- Dialog default theme. --\u003e\n    \u003cstyle name=\"MyDialogTheme\" parent=\"Theme.AppCompat.Light.Dialog.Alert\"\u003e\n        \u003citem name=\"colorControlNormal\"\u003e@android:color/white\u003c/item\u003e\n        \u003citem name=\"colorControlActivated\"\u003e@color/colorPrimary\u003c/item\u003e\n        \u003citem name=\"textColorAlertDialogListItem\"\u003e@android:color/white\u003c/item\u003e\n        \u003citem name=\"colorAccent\"\u003e@color/colorPrimary\u003c/item\u003e\n        \u003citem name=\"android:textColorPrimary\"\u003e@android:color/black\u003c/item\u003e\n        \u003citem name=\"android:windowBackground\"\u003e@drawable/dialog_background\u003c/item\u003e\n    \u003c/style\u003e\n```\n\nIt would add colors to the controls and text.\nThen add a content drawable for backgound. Example:\n\n```XML\n\u003c?xml version=\"1.0\" encoding=\"utf-8\"?\u003e\n\n\u003cinset xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:insetLeft=\"16dp\"\n    android:insetTop=\"16dp\"\n    android:insetRight=\"16dp\"\n    android:insetBottom=\"16dp\"\u003e\n\n    \u003cshape android:shape=\"rectangle\"\u003e\n        \u003ccorners android:radius=\"2dp\" /\u003e\n        \u003csolid android:color=\"@color/colorMainBackground\" /\u003e\n    \u003c/shape\u003e\n\n\u003c/inset\u003e\n```\n\nuse example : ``` R.style.MyDialogTheme ```\n\nAnd you will have your custom theme applied.\n\n## Customizing dialog title\n\nIf you want to change title text color, then add a int color value as a 4th constructor parameter.\n\nuse example : ``` R.color.MyTextTitleColor ```\n\nAlso, if you want to change color of title view, you have to change you main theme primary color, because it depends on it's value.\n\n## Set a custom year range\n\nIf you want the displayed values of year vary within a range, you  have to set the first (min) and the last (max) year:\n\n```Java\nyearMonthPickerDialog.setMinYear(2000);\nyearMonthPickerDialog.setMaxYear(2020);\n```\n\n### Check demonstraction project for more details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftwinkle942910%2Fmonthyearpicker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftwinkle942910%2Fmonthyearpicker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftwinkle942910%2Fmonthyearpicker/lists"}