Unplanned
Last Updated: 18 Apr 2018 07:56 by Attila Antal
ADMIN
Attila Antal
Created on: 17 Apr 2018 08:51
Category: InputManager
Type: Bug Report
1
RadInput incorrect display of the "d" custom format specifier using DisplayDateFormat and/or DateFormat properties
When the "d" custom format specifier is used to format the Date or DisplayDate of RadDateInput, results are incorrect. Instead of showing only the day of the month, it shows dd/MM/yyyy. This issue affects all Picker controls that are using RadDateInput.

As a workaround, one option would be to define the DateFormat and DisplayDateFormat client-side

        <script type="text/javascript">
            function pageLoad(app, args) {
                var datetimepicker = $find("<%= RadDatePicker1.ClientID %>");
                var date = datetimepicker.get_selectedDate();
                datetimepicker.get_dateInput().set_dateFormat("d");
                datetimepicker.get_dateInput().set_displayDateFormat("d");
                datetimepicker.set_selectedDate(date);
            }
        </script>

another option could be to put a space or a two signle-quotes before or after the format specifier letter in the markup:

e.g.
DateFormat=" d"
DateFormat="d "
DateFormat="''d"
DateFormat="d''"

<telerik:RadDateInput ID="RadDateInput1" runat="server" DateFormat="d " DisplayDateFormat="d " SelectedDate="4/17/2018"></telerik:RadDateInput>
0 comments