Page 1 of 1

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

Posted: Sat Jun 06, 2015 3:02 am
by Enfiled Riders

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?


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

Posted: Sat Jun 06, 2015 7:14 pm
by Illya Stepanov

Hi -

Please check similar topic here: https://getsatisfaction.com/apperyio/...


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

Posted: Sun Jun 07, 2015 10:49 am
by Enfiled Riders

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


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

Posted: Sun Jun 07, 2015 11:33 am
by Illya Stepanov

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

Image


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

Posted: Sun Jun 07, 2015 1:41 pm
by Enfiled Riders

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).!


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

Posted: Mon Jun 08, 2015 6:13 am
by Enfiled Riders

Hey!

Any update on this problem?


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

Posted: Mon Jun 08, 2015 6:52 am
by Illya Stepanov