Hello,
While it is possible to set datepicker as an edit item in an aspx Kanban board:
<EditSettings
<EditItems >
<ej:KanbanEditItem EditType="DatePicker" Field="Deadline" >
etc.
- I cannot find an example of a datepicker being implemented into a template:
<EditSettings AllowAdding="true" AllowEditing="true" EditMode="DialogTemplate" DialogTemplate="#template" >
...
<script id="template" type="text/template">
<td style="text-align: center;">
<h4>Deadline</h4>
<ej:DatePicker ID="Deadlines" runat="server" Value="7/18/2014" Width="180px">
</ej:DatePicker>
</td>
etc.
If the datepicker element is specified outside of the template, as a regular page element, it gets rendered just fine. But when inside the template it renders like a generic text field.
The first problem is this rendering. However, there seems to be another problem in the value adding.
<ej:DatePicker ID="Deadlines" runat="server" Width="180px" AllowEdit="true" DateFormat="dd/MM/yyyy" Value="{{:Deadline}}" />
Will cause the following error to occur "Cannot create an object of type 'System.Nullable`1[[System.DateTime, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]' from its string representation '{{:Deadline}}' for the 'Value' property" - The Deadline property being of VB.net Date type. Even if the value is set manually - Value="7/18/2014" - the datepicker still renders as an empty text field.
My questions are
- How do I implement a datepicker element to my dialog template so it renders correctly?
- How do I incorporate the {{:Deadline}} variable without the aforementioned error occurring, as well as not getting a blank field?
- How do one add validation rules in a dialog template? Basically I want the filling in of all editable values in my template to be mandatory.
I have added a zip with a screenshot showing the difference in rendering of a datepicker element outside and inside of a template on the same page.
etc.
If the datepicker element is specified outside of the template, as a regular page element, it gets rendered just fine. But when inside the template it renders like a generic text field.
The first problem is this rendering. However, there seems to be another problem in the value adding.
Will cause the following error to occur "Cannot create an object of type 'System.Nullable`1[[System.DateTime, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]' from its string representation '{{:Deadline}}' for the 'Value' property" -The Deadline property being of VB.net Date type. Even if the value is set manually -Value="7/18/2014" - the datepicker still renders as an empty text field.
My questions are
- How do I implement a datepicker element to my dialog template so it renders correctly?
- How do I incorporate the {{:Deadline}} variable without the aforementioned error occurring, as well as not getting a blank field?
- How do one add validation rules in a dialog template? Basically I want the filling in of all editable values in my template to be mandatory.
I have added a zip with a screenshot showing the difference in rendering of a datepicker element outside and inside of a template on the same page.