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: mindate and maxdate with selectionMode=range #4435

majulvez opened this Issue Jan 15, 2019 · 1 comment


None yet
2 participants
Copy link

majulvez commented Jan 15, 2019

1) Environment

  • Version 6.2.14
  • Tested with version 7-SNAPSHOT too and it happens the same error
  • Apache Tomcat 7.0.62
  • Chrome/Firefox

2) Expected behavior

Showing datePicker component with a min a max interval

3) Actual behavior

It shows javascript errors

4) Steps to reproduce

Just go to see the xhtml file in the browser and you see the same picture I posted in the forum

5) Sample XHTML

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

6) Sample bean

package com.primefaces.test;

import javax.faces.bean.ManagedBean;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.Date;
import java.util.List;

@ManagedBean(name = "calendarView")
public class CalendarView implements Serializable {

private Date minDate;
private Date maxDate;
private List<Date> dates;

public CalendarView() {
    Date today = Calendar.getInstance().getTime();
    long oneDay = 24 * 60 * 60 * 1000;
    minDate = new Date(today.getTime() - (365 * oneDay));
    maxDate = new Date(today.getTime() + (365 * oneDay));

public String getValue() {
    return value;

public void setValue(String value) {
    this.value = value;

public Date getMinDate() {
    return minDate;

public void setMinDate(Date minDate) {
    this.minDate = minDate;

public Date getMaxDate() {
    return maxDate;

public void setMaxDate(Date maxDate) {
    this.maxDate = maxDate;

public List<Date> getDates() {
    return dates;

public void setDates(List<Date> dates) {
    this.dates = dates;


I tested selectionMode="range" and disabledDates option together and datePicker is showing mostly the same errors than in this issue

@mertsincan mertsincan self-assigned this Jan 16, 2019

@mertsincan mertsincan added this to the 7.0 milestone Jan 16, 2019


This comment has been minimized.

Copy link

mertsincan commented Jan 16, 2019

Fixed for next version. Thanks a lot!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment