{"id":25806030,"url":"https://github.com/alipsa/fx-yearmonth-picker","last_synced_at":"2025-12-25T14:02:29.376Z","repository":{"id":57742905,"uuid":"282422043","full_name":"Alipsa/fx-yearmonth-picker","owner":"Alipsa","description":"A year-month date picker component for java fx","archived":false,"fork":false,"pushed_at":"2023-07-27T15:44:49.000Z","size":150,"stargazers_count":7,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-27T01:06:06.807Z","etag":null,"topics":["datepicker","java","javafx"],"latest_commit_sha":null,"homepage":"","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":".github/FUNDING.yml","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},"funding":{"github":["Alipsa"]}},"created_at":"2020-07-25T10:32:55.000Z","updated_at":"2024-11-12T08:25:09.000Z","dependencies_parsed_at":"2025-02-27T20:16:03.125Z","dependency_job_id":"2ab7a032-39ff-49ee-b528-7b31929d5db2","html_url":"https://github.com/Alipsa/fx-yearmonth-picker","commit_stats":null,"previous_names":["pernyfelt/fx-yearmonth-picker"],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/Alipsa/fx-yearmonth-picker","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Alipsa%2Ffx-yearmonth-picker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Alipsa%2Ffx-yearmonth-picker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Alipsa%2Ffx-yearmonth-picker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Alipsa%2Ffx-yearmonth-picker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Alipsa","download_url":"https://codeload.github.com/Alipsa/fx-yearmonth-picker/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Alipsa%2Ffx-yearmonth-picker/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28030909,"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-12-25T02:00:05.988Z","response_time":58,"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":["datepicker","java","javafx"],"created_at":"2025-02-27T19:52:46.683Z","updated_at":"2025-12-25T14:02:29.342Z","avatar_url":"https://github.com/Alipsa.png","language":"Java","funding_links":["https://github.com/sponsors/Alipsa"],"categories":[],"sub_categories":[],"readme":"# fx-yearmonth-picker\n[![Maven Central](https://maven-badges.herokuapp.com/maven-central/se.alipsa/fx-yearmonth-picker/badge.svg)](https://maven-badges.herokuapp.com/maven-central/se.alipsa/fx-yearmonth-picker)\n[![javadoc](https://javadoc.io/badge2/se.alipsa/fx-yearmonth-picker/javadoc.svg)](https://javadoc.io/doc/se.alipsa/fx-yearmonth-picker)\n\nA year-month date picker component for java fx. Requires java 11 and javafx 11 or higher (tested with jdk 11 and jfx 17.02)\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 \ndesired year month.\n\n\nSee test.alipsa.ymp.YearMonthPickerExample for a simple example of both. Here's an example screenshot:\n\u003cimg src=\"https://raw.githubusercontent.com/perNyfelt/fx-yearmonth-picker/master/docs/example.png\" alt=\"Example Screenshot\" width=\"350\" height=\"150\" /\u003e\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\nYearMonthPicker ymp = new YearMonthPicker();\nymp.setOnAction(a -\u003e System.out.println(\"Default YearMonthPicker, Value picked was \" + ymp.getValue()));\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\u003efx-yearmonth-picker\u003c/artifactId\u003e\n  \u003cversion\u003e1.1.0\u003c/version\u003e\n\u003c/dependency\u003e\n```\n...or the equivalent to you favorite build tool.\n\nNote that the dependency on java fx is set to \"provided\" meaning that you need to add\na dependency to javafx explicitly in your project or use a jvm where javafx is bundled \n(such as Bellsofts liberica full)\n\nThe module name for this library is `se.alipsa.ymp`\n\n## se.alipsa.ymp.YearMonthPickerCombo\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.ymp.YearMonthPicker\n\u003cimg src=\"https://raw.githubusercontent.com/perNyfelt/fx-yearmonth-picker/master/docs/example2.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.\n\n## Customization\nThe YearMonthPicker has a style class called \"year-month-picker\", and the YearMonthPickerCombo a style class called\n\"year-month-picker-combo\" which can be used to specify specific css styling for the components. \n\nBoth components are styled like a default combobox.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falipsa%2Ffx-yearmonth-picker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falipsa%2Ffx-yearmonth-picker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falipsa%2Ffx-yearmonth-picker/lists"}