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

DatePicker with range selection doesn't work with initial value #4514

Closed
mertsincan opened this Issue Feb 7, 2019 · 0 comments

Comments

Projects
None yet
1 participant
@mertsincan
Copy link
Member

mertsincan commented Feb 7, 2019

Exp;

//bean.java
...
   @PostConstruct
   public void init() {
        Date today = Calendar.getInstance().getTime();
        long oneDay = 24 * 60 * 60 * 1000;
        Date tomorrow = new Date(today.getTime() + (1 * oneDay));

        dates = new ArrayList<>();
        dates.add(today);
        dates.add(tomorrow);
   }
...

//xhtml
<p:datePicker value="#{calendarView.range}" selectionMode="range" />
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment