{"id":46,"date":"2020-07-29T10:42:11","date_gmt":"2020-07-29T10:42:11","guid":{"rendered":"http:\/\/www.alipsa.se\/wordpress\/?p=46"},"modified":"2020-08-29T09:43:26","modified_gmt":"2020-08-29T09:43:26","slug":"fx-yearmonth-picker-an-open-source-javafx-date-component-released","status":"publish","type":"post","link":"https:\/\/www.alipsa.se\/wordpress\/2020\/07\/29\/fx-yearmonth-picker-an-open-source-javafx-date-component-released\/","title":{"rendered":"fx-yearmonth-picker, an open source JavaFx date component released"},"content":{"rendered":"\n<p>I just released this javafx component on <a rel=\"noreferrer noopener\" href=\"https:\/\/github.com\/perNyfelt\/fx-yearmonth-picker\" target=\"_blank\">github<\/a> under the liberal MIT license.<\/p>\n\n\n\n<p>There are two versions:<\/p>\n\n\n\n<ol class=\"wp-block-list\"><li>YearMonthPickerCombo &#8211; a combobox that return a YearMonth.<\/li><li>YearMonthPicker &#8211; A custom control that resembles DatePicker where the user can click a calendar and then pick the desired year month.<\/li><\/ol>\n\n\n\n<p>See test.alipsa.ymp.YearMonthPickerExample for a simple example of both. Here&#8217;s an example screenshot:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"702\" height=\"348\" src=\"http:\/\/www.alipsa.se\/wordpress\/wp-content\/uploads\/2020\/08\/fx-yearmonth-picker-example.png\" alt=\"\" class=\"wp-image-47\" srcset=\"https:\/\/www.alipsa.se\/wordpress\/wp-content\/uploads\/2020\/08\/fx-yearmonth-picker-example.png 702w, https:\/\/www.alipsa.se\/wordpress\/wp-content\/uploads\/2020\/08\/fx-yearmonth-picker-example-300x149.png 300w\" sizes=\"(max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 984px) 61vw, (max-width: 1362px) 45vw, 600px\" \/><\/figure>\n\n\n\n<p>Both works similar to a combo box i.e. you do getValue() to get the value and setOnAction() to capture a value change e.g.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"java\" class=\"language-java\">YearMonthPicker ymp = new YearMonthPicker();\nymp.setOnAction(a -> System.out.println(\"Default YearMonthPicker, Value picked was \" + ymp.getValue()));<\/code><\/pre>\n\n\n\n<p>There are no external dependencies, and the jar file is about 40kb so nice and small. You can download the jar file from the release section or add the following to your maven file:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"xml\" class=\"language-xml\">&lt;dependency>\n  &lt;groupId>se.alipsa&lt;\/groupId>\n  &lt;artifactId>fx-yearmonth-picker&lt;\/artifactId>\n  &lt;version>1.0.2&lt;\/version>\n&lt;\/dependency><\/code><\/pre>\n\n\n\n<p>Below is a screenshot of the YearMonthPicker in action<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"785\" height=\"1024\" src=\"http:\/\/www.alipsa.se\/wordpress\/wp-content\/uploads\/2020\/08\/fx-yearmonth-picker-example2-785x1024.png\" alt=\"\" class=\"wp-image-48\" srcset=\"https:\/\/www.alipsa.se\/wordpress\/wp-content\/uploads\/2020\/08\/fx-yearmonth-picker-example2-785x1024.png 785w, https:\/\/www.alipsa.se\/wordpress\/wp-content\/uploads\/2020\/08\/fx-yearmonth-picker-example2-230x300.png 230w, https:\/\/www.alipsa.se\/wordpress\/wp-content\/uploads\/2020\/08\/fx-yearmonth-picker-example2-768x1001.png 768w, https:\/\/www.alipsa.se\/wordpress\/wp-content\/uploads\/2020\/08\/fx-yearmonth-picker-example2.png 787w\" sizes=\"(max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 984px) 61vw, (max-width: 1362px) 45vw, 600px\" \/><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>I just released this javafx component on github under the liberal MIT license. There are two versions: YearMonthPickerCombo &#8211; a combobox that return a YearMonth. YearMonthPicker &#8211; A custom control that resembles DatePicker where the user can click a calendar and then pick the desired year month. See test.alipsa.ymp.YearMonthPickerExample for a simple example of both. &hellip; <a href=\"https:\/\/www.alipsa.se\/wordpress\/2020\/07\/29\/fx-yearmonth-picker-an-open-source-javafx-date-component-released\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;fx-yearmonth-picker, an open source JavaFx date component released&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-46","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/www.alipsa.se\/wordpress\/wp-json\/wp\/v2\/posts\/46"}],"collection":[{"href":"https:\/\/www.alipsa.se\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.alipsa.se\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.alipsa.se\/wordpress\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.alipsa.se\/wordpress\/wp-json\/wp\/v2\/comments?post=46"}],"version-history":[{"count":2,"href":"https:\/\/www.alipsa.se\/wordpress\/wp-json\/wp\/v2\/posts\/46\/revisions"}],"predecessor-version":[{"id":50,"href":"https:\/\/www.alipsa.se\/wordpress\/wp-json\/wp\/v2\/posts\/46\/revisions\/50"}],"wp:attachment":[{"href":"https:\/\/www.alipsa.se\/wordpress\/wp-json\/wp\/v2\/media?parent=46"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.alipsa.se\/wordpress\/wp-json\/wp\/v2\/categories?post=46"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.alipsa.se\/wordpress\/wp-json\/wp\/v2\/tags?post=46"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}