Skip to main content

Hi there,

 

I'm a newbie at SmartForms and I'm building one where in I have 2 dates. A start Date and an end date. The start date can only be today and future. And the end date obvioulsy is greater than or equal to the start date, so the end date should automatically only show from that date onwards.

 

So for example, if the user is on the form today Jun  26th 2015, the picker selection should only allow June 26th onwards in start date. Let's say the user selects October 1st as the start date then, the end date picket should start from October 1st, without the user having to click multiple times.

 

I don't see such a setting in the properties of the Date picker. Let me know how can I achieve this.

 

thank you

 

Hi nikhilgon,

 


Unfortunately this feature is not in smartforms, you can just validate it, I mean if the user choose wrong date show pop up msg to inform the user that the date is wrong, you can't control what to show in the calendar

 

 

 


Thanks for the reply!

 

this means that the "smart"forms are not smart, at least not in the date picker. I can easily find Javascrupt date controls that help me achieve this easily. I thought this should be part of this solution.

 


You can restrict Dates by using an expression



  • First create a datalabel called DLDateTime

  • Add a rule that when the date is changed transfer the date to DLDateTime

  • Then on the calander control use the folling example to restrict input.

  • The below will ensure the user can only pick today date an onwards

    • If ( DLDateTime < Now ( ) , Now ( ) , DLDateTime )




Hi ,

I tried restricting the previous dates on the Form.

 

Below are the steps.

1.Create Date/Time Control on the view >EX:StartDate/Time]

2.On k2 Smart Form create an expresssion 

 

 

 


I have tried in k2 five its not working


Reply