{"id":25806010,"url":"https://github.com/alipsa/swing-yearmonth-picker","last_synced_at":"2025-11-23T04:02:39.989Z","repository":{"id":203756260,"uuid":"709834768","full_name":"Alipsa/swing-yearmonth-picker","owner":"Alipsa","description":"A year-month date picker component for java swing","archived":false,"fork":false,"pushed_at":"2025-02-21T08:20:35.000Z","size":115,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-21T09:27:58.133Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","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/Alipsa.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}},"created_at":"2023-10-25T13:45:51.000Z","updated_at":"2025-02-21T08:19:44.000Z","dependencies_parsed_at":null,"dependency_job_id":"6003d7af-4d7f-4a9d-af0e-e60d6a5eeeca","html_url":"https://github.com/Alipsa/swing-yearmonth-picker","commit_stats":null,"previous_names":["alipsa/swing-yearmonth-picker"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Alipsa/swing-yearmonth-picker","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Alipsa%2Fswing-yearmonth-picker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Alipsa%2Fswing-yearmonth-picker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Alipsa%2Fswing-yearmonth-picker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Alipsa%2Fswing-yearmonth-picker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Alipsa","download_url":"https://codeload.github.com/Alipsa/swing-yearmonth-picker/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Alipsa%2Fswing-yearmonth-picker/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":285898429,"owners_count":27250309,"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","status":"online","status_checked_at":"2025-11-23T02:00:06.149Z","response_time":135,"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":[],"created_at":"2025-02-27T19:52:37.457Z","updated_at":"2025-11-23T04:02:39.957Z","avatar_url":"https://github.com/Alipsa.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Swing Yearmonth picker\n[![Maven Central](https://maven-badges.herokuapp.com/maven-central/se.alipsa/swing-yearmonth-picker/badge.svg)](https://maven-badges.herokuapp.com/maven-central/se.alipsa/swing-yearmonth-picker)\n[![javadoc](https://javadoc.io/badge2/se.alipsa/swing-yearmonth-picker/javadoc.svg)](https://javadoc.io/doc/se.alipsa/swing-yearmonth-picker)\n\nA year-month date picker component for java swing. Requires java 11 or higher (tested with jdk 11 and 17)\n\nThere are two versions:\n1. YearMonthPickerCombo - a combobox that return a YearMonth.\n2. YearMonthPicker - A custom control that resembles DatePicker where the user can click a calendar and then pick the\n   desired year month.\n\nBoth works similar to a combo box i.e. you do getValue() to get the value and\nsetOnAction() to capture a value change e.g.\n```java\nimport se.alipsa.symp.YearMonthPicker;\n\nclass Example {\n  public static void main(String[] args) {\n    JFrame frame = new JFrame(\"Year month combo\");\n    JPanel panel = new JPanel();\n    frame.add(panel);\n    YearMonthPicker ymp = new YearMonthPicker();\n    ymp.addListener(e -\u003e System.out.println(ymp.getValue()));\n    panel.add(new JLabel(\"Default Combo: \"));\n    panel.add(ymp);\n    frame.pack();\n    frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n    frame.setVisible(true);\n  }\n}\n```\n\nThere are no external dependencies, and the jar file is about 40kb so nice and small. You can download the jar file from\nthe release section or add the following to your maven file:\n```xml\n\u003cdependency\u003e\n  \u003cgroupId\u003ese.alipsa\u003c/groupId\u003e\n  \u003cartifactId\u003eswing-yearmonth-picker\u003c/artifactId\u003e\n  \u003cversion\u003e1.0.0\u003c/version\u003e\n\u003c/dependency\u003e\n```\n...or the equivalent to you favorite build tool.\nThe module name for this library is `se.alipsa.symp`\n\n## se.alipsa.symp.YearMonthPickerCombo\n\u003cimg src=\"https://raw.githubusercontent.com/Alipsa/swing-yearmonth-picker/master/docs/YearMonthPickerCombo.png\" alt=\"YearMonthPickerCombo Screenshot\" width=\"350\" /\u003e\nThere are 5 constructors:\n\n__YearMonthPickerCombo()__\nThis gives you YearMonths 3 year back and 3 years into the future from now.\n\n__YearMonthPickerCombo(YearMonth initial)__\nThis gives you YearMonths 3 year back and 3 years into the future from initial.\n\n__YearMonthPickerCombo(YearMonth from, YearMonth to, YearMonth initial)__\nThis gives you all yearmonths between from and to (both from and to included) with the\ninitial value as the default selected.\n\n__YearMonthPickerCombo(YearMonth from, YearMonth to, YearMonth initial, Locale locale)__\nThis gives you all yearmonths between from and to (both from and to included) with the\ninitial value as the default selected displayed in the locale specified formatted as \"yyyy-MM\".\n\n__YearMonthPickerCombo(YearMonth from, YearMonth to, YearMonth initial, Locale locale, String format)__\nThis gives you all yearmonths between from and to (both from and to included) with the\ninitial value as the default selected, displayed in the locale specified in the format specified.\n\n## se.alipsa.symp.YearMonthPicker\n\u003cimg src=\"https://raw.githubusercontent.com/Alipsa/swing-yearmonth-picker/master/docs/YearMonthPicker.png\" alt=\"YearMonthPickerCombo Screenshot\" width=\"350\" /\u003e\nThere are 5 constructors:\n\n__YearMonthPicker()__ This gives you YearMonths 3 year back and 3 years into the future from now in\nthe system default locale.\n\n__YearMonthPicker(YearMonth initial)__\nThis gives you YearMonths 3 year back and 3 years into the future from initial in\nthe system default locale.\n\n__YearMonthPicker(YearMonth initial, Locale locale)__\nThis gives you YearMonths 3 year back and 3 years into the future from initial in\nthe specified locale. Month names are in full (long) format.\n\n__YearMonthPicker(YearMonth from, YearMonth to, YearMonth initial)__\nThis gives you all yearmonths between from and to (both from and to included) with the\ninitial value as the default selected in the default locale.\nThe display value (when a year month is chosen) will be displayed in the\nformat \"yyyy-MM\".\n\n__YearMonthPicker(YearMonth from, YearMonth to, YearMonth initial, String monthNameFormat)__\nThis gives you all yearmonths between from and to (both from and to included) with the\ninitial value as the default selected in the default locale. MonthNameFormat is how the\nmonth names will be displayed in the popup. Set it to \"MMM\" for the letter short style\nor include the year with \"yyyy-MMM\" or whatever.\nThe display value (when a year month is chosen) will be displayed in the\nformat \"yyyy-MM\".\n\n__YearMonthPicker(YearMonth from, YearMonth to, YearMonth initial, Locale locale, String monthNameFormat)__\nThis gives you all yearmonths between from and to (both from and to included) with the\ninitial value as the default selected in the locale specified. MonthNameFormat is how the\nmonth names will be displayed in the popup. Default is \"MMMM\" (long format), set to \"MMM\" for the letter short style\nor include the year with \"yyyy-MMM\" or whatever. The display value (when a year month is chosen) will be displayed in the\nformat \"yyyy-MM\".\n\n__YearMonthPicker(YearMonth from, YearMonth to, YearMonth initial, Locale locale, String monthPattern, String yearMonthPattern)__\nThis gives you all yearmonths between from and to (both from and to included) with the\ninitial value as the default selected in the locale specified. MonthNameFormat is how the\nmonth names will be displayed in the popup. Default is \"MMMM\" (long format), set to \"MMM\" for the letter short style\nor include the year with \"yyyy-MMM\" or whatever. The display value (when a year month is chosen) will be displayed in the\nformat provided with the yearMonthPattern argument.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falipsa%2Fswing-yearmonth-picker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falipsa%2Fswing-yearmonth-picker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falipsa%2Fswing-yearmonth-picker/lists"}