Unplanned
Last Updated: 09 Mar 2023 09:35 by Sarkis
Sarkis
Created on: 09 Mar 2023 09:35
Category: DatePicker
Type: Bug Report
0
SmartPasring feature does not work if set through ASP.NET Theme (SkinFile)

We are in the process of upgrading our controls to Telerik. We had noticed a behavior that we did not want to happen, this was related to DatePicker control changing the value of the date if incorrect format was entered, we solved this by having EnableSmartParsing to false in our Telerik Theme so that it applies to all DatePicker controls.

Now we have some instances of date controls that are defined with specific DateFormat/DisplayDateFormat like below:

<telerik:RadDatePicker ID="dpId" DateInput-DisplayDateFormat="y" DateInput-DateFormat="y" runat="server"></telerik:RadDatePicker> or 

<telerik:RadDatePicker ID="dpFrom" DateInput-DateFormat="MM/yyyy" DateInput-DisplayDateFormat="MMM, yyyy" runat="server"></telerik:RadDatePicker>
Now since we have the below set in a theme these controls will also pick up the global properties, and it looks like having DateInput-EnableSmartParsing="false" along with any different DateFormat/DisplayDateFormat is always rejecting the value being entered (error is shown as wrong format being entered with exclamation mark). Is this due to limitation of having EnableSmartParsing="false" ? setting this to true resolves the issue for these controls, i just want a confirmation if this is by design and what sort of workarounds there are?
<telerik:RadDatePicker runat="server"
  DatePopupButton-Visible="false" 
  PopupDirection="BottomLeft" 
  ShowPopupOnFocus="true" 
  DateInput-EnabledStyle-HorizontalAlign="Left" 
  DateInput-EnableSmartParsing="false"  
  MinDate="0001-01-01">
</telerik:RadDatePicker>

 

0 comments