New component DatePicker - SelectionMode (6.2.14)

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

11 Jan 2019, 15:05

Hi all,

is there a way to set up the new component datePicker in order to allow selectionMode="multiple" but only allow select two dates?

Thanks
Best regards

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

12 Jan 2019, 15:51

Yes maxDateCount="2"

Code: Select all

<attribute>
            <description><![CDATA[Maximum number of selectable dates in multiple mode.]]></description>
            <name>maxDateCount</name>
            <required>false</required>
            <type>java.lang.Integer</type>
            <defaultValue>java.lang.Integer.MAX_VALUE</defaultValue>
        </attribute>
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

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

14 Jan 2019, 22:53

Thanks!
Melloware wrote:
12 Jan 2019, 15:51
Yes maxDateCount="2"

Code: Select all

<attribute>
            <description><![CDATA[Maximum number of selectable dates in multiple mode.]]></description>
            <name>maxDateCount</name>
            <required>false</required>
            <type>java.lang.Integer</type>
            <defaultValue>java.lang.Integer.MAX_VALUE</defaultValue>
        </attribute>

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: Google [Bot] and 44 guests