Hi,
I am trying to implement endDate for a dateTime field but its not working,
Can you please let me know what is wrong with my code.
I need max date should be current, user is not allowed to enter date more than current date or future date.
Here is the dataSource declaration.
<DataSource>
<ID>estData</ID>
<title>Attach</title>
<recordName>Attach</recordName>
<serverType>generic</serverType>
<dropExtraFields>true</dropExtraFields>
<primaryKeyField>AttachPK</primaryKeyField>
<fields>
<field>
<name>timeAttachHappened</name>
<title>Attach Time</title>
<type>dateTime</type>
<useTextField>true</useTextField>
</field>
<field>
<name>attachDate</name>
<title>Attach Date </title>
<type>dateTime</type>
<required>true</required>
<endDate>new Date()</endDate>
<pickerIconPrompt></pickerIconPrompt>
<useTextField>true</useTextField>
<detail>true</detail>
</field>
</fields>
<serverObject lookupStyle="spring" bean="attachResource"/>
<operationBindings>
<binding operationType="fetch" serverMethod="get">
<serverObject lookupStyle="spring" bean="attachResource"/>
</binding>
</operationBindings>
<operationBindings>
<binding operationType="add" serverMethod="addAttach">
<serverObject lookupStyle="spring" bean="attachResource"/>
</binding>
</operationBindings>
</DataSource>
using this code date picker is coming but not restricting future date.
I am trying to implement endDate for a dateTime field but its not working,
Can you please let me know what is wrong with my code.
I need max date should be current, user is not allowed to enter date more than current date or future date.
Here is the dataSource declaration.
<DataSource>
<ID>estData</ID>
<title>Attach</title>
<recordName>Attach</recordName>
<serverType>generic</serverType>
<dropExtraFields>true</dropExtraFields>
<primaryKeyField>AttachPK</primaryKeyField>
<fields>
<field>
<name>timeAttachHappened</name>
<title>Attach Time</title>
<type>dateTime</type>
<useTextField>true</useTextField>
</field>
<field>
<name>attachDate</name>
<title>Attach Date </title>
<type>dateTime</type>
<required>true</required>
<endDate>new Date()</endDate>
<pickerIconPrompt></pickerIconPrompt>
<useTextField>true</useTextField>
<detail>true</detail>
</field>
</fields>
<serverObject lookupStyle="spring" bean="attachResource"/>
<operationBindings>
<binding operationType="fetch" serverMethod="get">
<serverObject lookupStyle="spring" bean="attachResource"/>
</binding>
</operationBindings>
<operationBindings>
<binding operationType="add" serverMethod="addAttach">
<serverObject lookupStyle="spring" bean="attachResource"/>
</binding>
</operationBindings>
</DataSource>
using this code date picker is coming but not restricting future date.
Comment