May 20, 2015, 10:00 PM
VType DateField Problem
Hi,
I have a page that contains 2 date fields with VType = daterange, From & To. I set values for them in code behind. But when I do this, the control of end date disappears.
Could you please help me?
<CustomConfig>
<ext:ConfigItem Name="endDateField" Value="#{dfTo}" Mode="Value" />
</CustomConfig>
</ext:DateField>
<ext:DateField ID="dfTo" runat="server" Editable="false" Vtype="daterange" Format="yyyy/MM/dd">
<CustomConfig>
<ext:ConfigItem Name="startDateField" Value="#{dfFrom}" Mode="Value" />
</CustomConfig>
<Listeners>
<BeforeRender Handler="this.onTriggerClick = this.onTriggerClick.createSequence(function() {
var maxDate = new Date();
maxDate = maxDate;
this.menu.picker.setMaxDate(maxDate);}); "/>
</Listeners>
</ext:DateField>
If I remove the property vtype = "daterange" if both dates are presented, but I need to validate the date range user selectable.
Thanks.
I have a page that contains 2 date fields with VType = daterange, From & To. I set values for them in code behind. But when I do this, the control of end date disappears.
Could you please help me?
dfFrom.SelectedDate = DateTime.Now
dfTo.SelectedDate = DateTime.Now
<ext:DateField ID="dfFrom" runat="server" Editable="false" Vtype="daterange" Format="yyyy/MM/dd"><CustomConfig>
<ext:ConfigItem Name="endDateField" Value="#{dfTo}" Mode="Value" />
</CustomConfig>
</ext:DateField>
<ext:DateField ID="dfTo" runat="server" Editable="false" Vtype="daterange" Format="yyyy/MM/dd">
<CustomConfig>
<ext:ConfigItem Name="startDateField" Value="#{dfFrom}" Mode="Value" />
</CustomConfig>
<Listeners>
<BeforeRender Handler="this.onTriggerClick = this.onTriggerClick.createSequence(function() {
var maxDate = new Date();
maxDate = maxDate;
this.menu.picker.setMaxDate(maxDate);}); "/>
</Listeners>
</ext:DateField>
If I remove the property vtype = "daterange" if both dates are presented, but I need to validate the date range user selectable.
Thanks.