Skip to content
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

dateTimePicker maxDate NullPointerException #927

Closed
lobo115 opened this issue Mar 23, 2018 · 2 comments
Closed

dateTimePicker maxDate NullPointerException #927

lobo115 opened this issue Mar 23, 2018 · 2 comments
Assignees
Labels
Milestone

Comments

@lobo115
Copy link

lobo115 commented Mar 23, 2018

Hello, i was using dateTimePicker in Payara 4.1.2 and trying to set maxDate parameter and it give me a java.lang.NullPointerException , but when i change it for minDate it works perfect, my code is:
<b:dateTimePicker id="lastdate" show-time="false" maxDate="09/25/2018" />

@mattosoft
Copy link

this is because has a error in DateTimePickerRenderer, it controls minDate instead maxDate.
at line 400
String maxDate = BsfUtils.isStringValued(dtp.getMaxDate()) ? dtp.getMinDate().contains("moment") ? dtp.getMaxDate() : "'" + dtp.getMaxDate() + "'" : "";

@stephanrauh
Copy link
Collaborator

Awesome analysis! And a sharp eye, too. I had to look twice to spot the error in the source code!

I've upload a corrected version as BootsFaces-1.2.1-SNAPSHOT to Maven Central. See #369 on how to get it. I'll close the ticket because I'm positive it has been solved, but I'd like to invite you to test it with the developer snapshot. If anything went wrong, feel free to re-open the ticket.

Thanks in advance,
Stephan

@stephanrauh stephanrauh self-assigned this Apr 10, 2018
@stephanrauh stephanrauh added this to the v1.5.0 milestone Apr 10, 2018
@stephanrauh stephanrauh modified the milestones: v1.5.0, v1.3.0 Oct 13, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants