tag:blogger.com,1999:blog-1142670628978916041.post3834041819838384086..comments2023-05-16T07:46:09.823-07:00Comments on My JavaFX: JavaFX Calendar ControlChristian Schudthttp://www.blogger.com/profile/05150185502293392614noreply@blogger.comBlogger51125tag:blogger.com,1999:blog-1142670628978916041.post-61466681610822340322020-12-03T03:41:43.424-08:002020-12-03T03:41:43.424-08:00is it possible to display the datepicker without t...is it possible to display the datepicker without textfield and it will remain openMuhammad Harrishttps://www.blogger.com/profile/10939837813505455523noreply@blogger.comtag:blogger.com,1999:blog-1142670628978916041.post-4343046276644583482017-08-03T00:35:57.848-07:002017-08-03T00:35:57.848-07:00Hi Christian, I want to make some dates red as per...Hi Christian, I want to make some dates red as per my input. for eg, if I pass a date to function it should be reflected as red. Can you please guide how it can be done?Anonymoushttps://www.blogger.com/profile/16242645059065501463noreply@blogger.comtag:blogger.com,1999:blog-1142670628978916041.post-75844142264839550462016-08-11T02:27:09.676-07:002016-08-11T02:27:09.676-07:00Hi, Would you happen to have a time picker to go ...Hi, Would you happen to have a time picker to go with this?Paddyhttps://www.blogger.com/profile/10030861154706472501noreply@blogger.comtag:blogger.com,1999:blog-1142670628978916041.post-776957039264456372014-06-10T11:15:56.399-07:002014-06-10T11:15:56.399-07:00amazing! i will be using this for in a project of ...amazing! i will be using this for in a project of mine for date selection. Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-1142670628978916041.post-16948519283468603102014-04-17T05:14:12.758-07:002014-04-17T05:14:12.758-07:00Dieser Kommentar wurde vom Autor entfernt.Anonymoushttps://www.blogger.com/profile/07849878048957939701noreply@blogger.comtag:blogger.com,1999:blog-1142670628978916041.post-44995781556082387382014-04-15T18:22:01.460-07:002014-04-15T18:22:01.460-07:00Hi Christian, Great control !!! I am trying to use...Hi Christian, Great control !!! I am trying to use the DatePicker as custom cell factory in TableCell. I am not able to do a commitEdit() while trying to enter date manually instead of selecting from popup. Here is my implementation.<br /><br />datePicker.setOnKeyPressed(new EventHandler() {<br />@Override<br />public void handle(KeyEvent t) {<br /> if (t.getCode() == KeyCode.ENTER) {<br /> if(getItem() == null) {<br /> commitEdit(null);<br /> } else {<br /> commitEdit(datepicker.getValue());<br /> }<br /> } else if (t.getCode() == KeyCode.ESCAPE) {<br /> cancelEdit();<br /> }<br />}<br />});<br /><br />This works if i select a date from from the Calendar popup.sfdcsudiphttps://www.blogger.com/profile/08099999862395296715noreply@blogger.comtag:blogger.com,1999:blog-1142670628978916041.post-89335490099120120472014-02-17T14:35:07.332-08:002014-02-17T14:35:07.332-08:00OK, nevermind... I was trying to use the calendar ...OK, nevermind... I was trying to use the calendar property itself. Just using getValue() works as desired. Sorry! <br />Thanks again for a great component.Brian Vhttps://www.blogger.com/profile/03885571276357472391noreply@blogger.comtag:blogger.com,1999:blog-1142670628978916041.post-78462828526083220952014-02-16T22:45:16.192-08:002014-02-16T22:45:16.192-08:00Hi, Great component - thanks for the work. I have...Hi, Great component - thanks for the work. I have a question though... I don't see the selectedDate property anymore, and haven't figured out how to tell if the user has actually selected something. What am I missing?<br /><br />ThanksBrian Vhttps://www.blogger.com/profile/03885571276357472391noreply@blogger.comtag:blogger.com,1999:blog-1142670628978916041.post-69638661990295191592014-01-02T09:07:45.238-08:002014-01-02T09:07:45.238-08:00Hi,
Try the following:
1.) add a second style cla...Hi,<br />Try the following:<br /><br />1.) add a second style class to your datepicker instance, e.g. "error".<br />2.) add your own style sheet to the scene, which contains a style selector for your datepicker:<br />.date-picker.error .text-field<br />{<br />-fx-background-color: red;<br />}<br />It basically means "select node which have class date-picker AND error, then select subnode, which have class text-field".<br />3.) remove the style class again, when it is no longer needed.<br /><br />Haven't tested it though.Christian Schudthttps://www.blogger.com/profile/05150185502293392614noreply@blogger.comtag:blogger.com,1999:blog-1142670628978916041.post-74370467538468562472014-01-01T19:48:03.785-08:002014-01-01T19:48:03.785-08:00Hey Christian,
Is there any way by which you can a...Hey Christian,<br />Is there any way by which you can apply style to the TextField? For e.g - If user has input a wrong date, upon form submission, I need to change the background color of the text field to red.Pravathttps://www.blogger.com/profile/07112343900348602372noreply@blogger.comtag:blogger.com,1999:blog-1142670628978916041.post-52806521485694704282013-11-26T23:59:12.704-08:002013-11-26T23:59:12.704-08:00Hi,
try calling the show() method on the DatePicke...Hi,<br />try calling the show() method on the DatePicker instance. Alternatively you could also write/derive a new skin, which adds the icon directly to your skin. There's a showPopup method in the DatePickerSkin, which is private, but which should be invoked by calling show().Christian Schudthttps://www.blogger.com/profile/05150185502293392614noreply@blogger.comtag:blogger.com,1999:blog-1142670628978916041.post-39296201695662163282013-11-26T23:52:58.158-08:002013-11-26T23:52:58.158-08:00Hi Vadim,
ad 1): There's already a getCalenda...Hi Vadim,<br /><br />ad 1): There's already a getCalendar() method on the DatePicker class.<br />ad 2): I haven't created an extra EventType for that. Just use the valueProperty(). It changes as soon as a date is selected.Christian Schudthttps://www.blogger.com/profile/05150185502293392614noreply@blogger.comtag:blogger.com,1999:blog-1142670628978916041.post-66948809245189574562013-11-26T03:30:38.936-08:002013-11-26T03:30:38.936-08:00Hi Christian!
Is there possibility to open calend...Hi Christian!<br /><br />Is there possibility to open calendar popup from some external button. I would like to add calendar icon at next to date textfield and popup should be opened also by pressing the icon. I didn't found method for that. Is that possible?<br /><br />Anonymoushttps://www.blogger.com/profile/08669770589769840767noreply@blogger.comtag:blogger.com,1999:blog-1142670628978916041.post-39809841993001116112013-11-26T02:07:49.438-08:002013-11-26T02:07:49.438-08:00Thank you for this helpful DatePicker! I have a re...Thank you for this helpful DatePicker! I have a request and a question:<br />1) Could you please also implement a method that returns java.util.Calendar? With java.util.Date, timezone problems are possible. E.g. you select November 26, but the DatePicker returns November 25 23:00.<br />2) Please describe what kind of EventType should I pass to addEventHandler to intercept date selection event?Anonymoushttps://www.blogger.com/profile/18342383341896186832noreply@blogger.comtag:blogger.com,1999:blog-1142670628978916041.post-34229077444395261662013-11-22T00:50:01.836-08:002013-11-22T00:50:01.836-08:00Hi Christian, thank you very much for the time you...Hi Christian, thank you very much for the time you spent on creating this useful control!Mariahttps://www.blogger.com/profile/15549442909426528113noreply@blogger.comtag:blogger.com,1999:blog-1142670628978916041.post-70691815067612182632013-11-15T08:38:38.980-08:002013-11-15T08:38:38.980-08:00Hi. Sorry, I have no experience with running JavaF...Hi. Sorry, I have no experience with running JavaFX on the web. And without error message I really have no clue what might be wrong.Christian Schudthttps://www.blogger.com/profile/05150185502293392614noreply@blogger.comtag:blogger.com,1999:blog-1142670628978916041.post-6304325212063149612013-11-15T02:12:43.525-08:002013-11-15T02:12:43.525-08:00Hi Christian, I use this component on Webstart app...Hi Christian, I use this component on Webstart application and it works, but when i deploy it to Web Application on Tomcat Server, its doesn't show anything, thanks for advanceFichie Rowlandhttps://www.blogger.com/profile/00311056404532131317noreply@blogger.comtag:blogger.com,1999:blog-1142670628978916041.post-44840692032848501222013-06-24T09:21:04.095-07:002013-06-24T09:21:04.095-07:00Hi. Sorry, my original code ie really old and I do...Hi. Sorry, my original code ie really old and I don't have it anymore. Please refer to the new code on Bitbucket (see my latest post). However, there is no today button anymore, since I felt it would blow up the API too much and it wasn't really that useful.<br />If you want to use the old code, it must be somewhere in the Skin implementation for the Calendar ("todayButton")Christian Schudthttps://www.blogger.com/profile/05150185502293392614noreply@blogger.comtag:blogger.com,1999:blog-1142670628978916041.post-53933850262845871862013-06-22T09:50:02.261-07:002013-06-22T09:50:02.261-07:00Hi. Any way I can change the today date. It's ...Hi. Any way I can change the today date. It's now getting current localsytem, but my application uses a specific clock supported by JodaTime. Any way I can assum today for a different date based on that DateTime from JodaTime ??<br /><br />Thanks.Eduardohttps://www.blogger.com/profile/03362455378842551667noreply@blogger.comtag:blogger.com,1999:blog-1142670628978916041.post-54407253658848868662013-05-16T14:07:09.357-07:002013-05-16T14:07:09.357-07:00Not sure what you exactly mean. Year, month and da...Not sure what you exactly mean. Year, month and day are all buttons. So you probably will just need to add a different style in the style class!?Christian Schudthttps://www.blogger.com/profile/05150185502293392614noreply@blogger.comtag:blogger.com,1999:blog-1142670628978916041.post-43383301724899477102013-05-15T21:53:15.257-07:002013-05-15T21:53:15.257-07:00Hi Christian, good work,I'm still new to java...Hi Christian, good work,I'm still new to javafx and I want to recover the year, month and day I select, can you tell me how its done?ErikaAlexandrahttps://www.blogger.com/profile/09119000144746551601noreply@blogger.comtag:blogger.com,1999:blog-1142670628978916041.post-17705112502471984722013-05-09T23:25:10.100-07:002013-05-09T23:25:10.100-07:00Nice thanks, do you have any license agreement so ...Nice thanks, do you have any license agreement so that I can refer to? Anonymoushttps://www.blogger.com/profile/06499408344737788906noreply@blogger.comtag:blogger.com,1999:blog-1142670628978916041.post-88123664815395928282013-05-08T11:59:32.071-07:002013-05-08T11:59:32.071-07:00Hi, in this version it's probably not implemen...Hi, in this version it's probably not implemented. You would have to do it in the MonthView class, where the buttons are updated.Christian Schudthttps://www.blogger.com/profile/05150185502293392614noreply@blogger.comtag:blogger.com,1999:blog-1142670628978916041.post-6120177519183689662013-05-08T11:56:54.278-07:002013-05-08T11:56:54.278-07:00Sure. Use and modify it as you like.Sure. Use and modify it as you like.Christian Schudthttps://www.blogger.com/profile/05150185502293392614noreply@blogger.comtag:blogger.com,1999:blog-1142670628978916041.post-44820525275929311892013-05-07T19:14:32.817-07:002013-05-07T19:14:32.817-07:00Can i use your calendar as based class for buildin...Can i use your calendar as based class for building my custom datepicker?<br /><br />Great job by the way.Anonymoushttps://www.blogger.com/profile/06499408344737788906noreply@blogger.com