-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Switch from microba to LGoodDatePicker #2176
Comments
Using JavaFx this should more or less work out-of-the-box: https://docs.oracle.com/javase/8/javafx/user-interface-tutorial/date-picker.htm Only the "none" and "today" buttons are not provided by default. |
Just invested half an hour to check whether integration Result: No it is not easily possible. The main problem is that the It would be possible to create a customized Calender PopUp using the Thus, I would recommend not to include it in 3.7 and to use the JavaFX version instead. |
Hi there, I'm the primary developer of LGoodDatePicker. I was reading your issue and I'm not sure what your exact use case needs are, but I wanted to let you know that if there are simple modifications that would allow the library to meet your needs, then creating such modifications would be an option as well. It sounds like you need to hide the text field, and allow the calendar panel to work with only the button showing? Shot in the dark at assisting: One quick impression is that it would probably not be especially hard to give the developer some control over where the calendar pop-up appears. I have not looked into the possibility of allowing the text field to be hidden in the library (It's not a use case that had occurred to me), but I'm guessing that could be accomplished too. (Whether by me or by authoring a pull request. ) Warm regards, |
Hi Blake! We have an "EntryEditor" using some custom "TextFields" in which our user can input the data to describe bibliography items (title, authors, ...). On of these fields is "date" for which we are using currently the microba (You can checkout our current implementation here at GitHub) If I got it right this is not really possible out-of-the-box with LGoodDatePicker, right? The only possibility would be to directly use the CalendarPanel. Regards, |
Thanks, yes that does show what you need. To answer your question, yes. You could directly use the calendar panel, with some work. However, I'm thinking it might be a lot less work to modify the DatePicker class to allow the date text field to be hidden. That way you might get all the custom pop-up functionality for free. The date picker does already have hooks to allow you to watch for date value changes, so a callback for transferring the date after the user selects it is already available. I'm going to play with the code a bit to see what it might take to show a "button only" form. I intend to post again when I have some more info. Blake |
Great! Thank you! |
Hello, For a visual demo, run "LGoodDatePicker-8.2.2-executable-demo.jar", scroll down under the date picker examples to see "Date 16, Hidden text field". Here's the applicable demo source code:
I'm guessing it's likely that the new source code is working fine, but please give feedback if you find any problems or bugs. Let me know if this fills the need. Warm regards, |
Hi @BlakeTNC ! Sorry for not replying earlier, but I was on the road this weekend. Thank you very much for your quick implementation! It works fine as can be seen in PR #2340. Just one small request: Is it possible to push the 8.2.2 version also to the maven repository? Would be easier for us to integrate in our gradle build. Regards |
Hi @matthiasgeiger, If you like, please add a "star" for the project on the top of the project page, to increase the project ratings. My goal is 30 stars, I have 6 to go. Cool that you were able to use the component pretty easily. (I looked at your change file.) Warm regards, |
Awesome! Just have merged the PR - so starting from the next version (and by now in the dev builds we are using your lib. Thanks again for your help! You have earned your star 😜 @JabRef/developers maybe you could push @BlakeTNC over the 30 stars? 😉 |
@matthiasgeiger @BlakeTNC I already did :-) Thanks for being so responsive! |
Very nice. You are welcome. : ) |
FYI: You may wish to update to LGoodDatePicker 8.3.0, (also visible on Maven Central within a few hours), because it includes a second Linux-specific bug fix. As I've learned, the JComponent focus gain/loss events are less than perfectly portable across operating systems. ("Write once, debug everywhere", right?, lol) If you'd like to receive notifications automatically of future releases, you could sign up for the release feed. |
Thank you for letting us know. We use https://www.versioneye.com/ to automatically track updates on depended libraries. Furthermore, I personally use https://sibbell.com/, which notifies me of new releases by starred repositories. 🎉 |
nice, thanks for letting me know about those tools. |
It seems that microba is not maintained any more: tdbear/microba@9a67c14. microba also recommends https://github.com/LGoodDatePicker/LGoodDatePicker for date switching (and also available on maven central (in contrast to microba)).
Since there seems to be an issue with the memory leak and microba (see #2166 (comment)), it seems that it is a good idea to switch to that library.
Alternative: Reimplement the tab in JavaFX. This could be significantly more effort than "just" replacing the library.
The text was updated successfully, but these errors were encountered: