DatePicker - mindate and maxdate with selectionMode=range

UI Components for JSF
Post Reply
majulvez
Posts: 14
Joined: 26 Jan 2017, 17:16

15 Jan 2019, 13:41

Hi,

are mindate and maxdate options working with selectionMode="range"? I can't get datePicker working if I use those options

Thanks
Best regards

kukeltje
Expert Member
Posts: 9605
Joined: 17 Jun 2010, 13:34
Location: Netherlands

15 Jan 2019, 14:25

What does "can't get it working" mean? Crashes? The attributes just not used? Code example? Checked the source?

majulvez
Posts: 14
Joined: 26 Jan 2017, 17:16

15 Jan 2019, 21:18

Test:

Code: Select all

<h:form id="form">
        <p:datePicker id="minmax" selectionMode="range" value="#{calendarView.dates}" mindate="#{calendarView.minDate}" maxdate="#{calendarView.maxDate}"  />
    </h:form>
#{calendarView.minDate} and #{calendarView.maxDate} are not null

Result: It shows javascript errors

Image

Conclusion:

It works fine if I don't use mindate or maxdate option.

majulvez
Posts: 14
Joined: 26 Jan 2017, 17:16

15 Jan 2019, 21:34

Something very similar is happening with selectionMode="range" and disabledDates option. Without selectionMode="range" disabledDates works fine, but with selectionMode="range" it shows javascript errors

Melloware
Posts: 3717
Joined: 22 Apr 2013, 15:48

15 Jan 2019, 23:27

since you have a reproducible test case I suggest reporting it on GitHub Issues page.
PrimeFaces Developer | PrimeFaces Extensions Developer
GitHub Profile: https://github.com/melloware
PrimeFaces Elite 13.0.0 / PF Extensions 13.0.0
PrimeReact 9.6.1


mert.sincan
Posts: 5281
Joined: 29 Jun 2013, 12:38

16 Jan 2019, 08:37

Fixed for next version. Thanks a lot!

majulvez
Posts: 14
Joined: 26 Jan 2017, 17:16

16 Jan 2019, 10:57

That was fast!

I've tested your fix. It works perfectly

Thanks

mert.sincan
Posts: 5281
Joined: 29 Jun 2013, 12:38

16 Jan 2019, 11:13

:D Glad to hear, thanks a lot for the update!

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 59 guests