Enfiled Riders
Posts: 0
Joined: Fri Jun 05, 2015 6:07 am

How to set the minimum date in the datepicker as the currentdate?

I am trying to make a ui screen which incorporates a datepicker.
I want the datepicker to be active only from the current date onwards ie the user should not be able to select any date before the currentdate.

How do I do it?

Enfiled Riders
Posts: 0
Joined: Fri Jun 05, 2015 6:07 am

How to set the minimum date in the datepicker as the currentdate?

Hey Illya,

I used the following javascript on the event of Page load :

var dateElement = Appery("date");
dateElement.setProperty("defaultDateValue", $.datepicker.formatDate(dateElement.datepicker_dataPickerOptions.dateFormat, new Date()));

where date is the datepicker name. Here the default date is set as the current date. ie it still allows me to choose an earlier date than the current date.

I do not want the user to be able to select a date before the current date in the datepicker component

Illya Stepanov
Posts: 0
Joined: Mon Mar 18, 2013 8:48 am

How to set the minimum date in the datepicker as the currentdate?

You can set minimum date in visual builder for your Datepicker component.

Image

Enfiled Riders
Posts: 0
Joined: Fri Jun 05, 2015 6:07 am

How to set the minimum date in the datepicker as the currentdate?

How do I set it to the system date?..
ie..if i set the minimum date as today(07th June 2015)...and i open the app tommorow.. technically i should see tommorows date (08th June 2015) and not todays.(07th June 2015).!

Enfiled Riders
Posts: 0
Joined: Fri Jun 05, 2015 6:07 am

How to set the minimum date in the datepicker as the currentdate?

Hey!

Any update on this problem?

Return to “Issues”