Primefaces navigating in between min and max dates

Today at work I was stuck at demonstrating all the possible years which are given by min and max date ranges in the backing bean in primefaces and jsf combo. So as default primefaces calendar component only displays

just set the year range to maximize the value the way you wish

								<p:calendar id="birthdate"
									value="#{memberController.order.birthdate}"
									yearRange="c-70:c+10"
									placeholder="#{msg.member_birthdate}" locale="tr"
									pattern="dd/MM/yyyy" mask="true" effect="fold"
									widgetVar="birthdateVar"
									styleClass="#{not component.valid ? 'ui-date-invalid default-input-date' : 'default-input-date'}"
									required="true"
									mindate="#{memberController.getBirthdateBegin()}"
									maxdate="#{memberController.getBirthdateEnd()}"
									navigator="true">
									<f:convertDateTime pattern="dd/MM/yyyy" />
								</p:calendar>

 

Leave a Reply

Your email address will not be published. Required fields are marked *