This is a migrated thread and some comments may be shown as answers.

RadDatePicker Bug with Korean Culture

1 Answer 55 Views
Calendar
This is a migrated thread and some comments may be shown as answers.
Nicolas
Top achievements
Rank 1
Nicolas asked on 31 Oct 2013, 01:27 PM
Hello Telerik-Support,

when picking a date with the RadDatePicker in korean culture the control always sets the current Date instead of the picked one.

function setCalendarTable() {
 
    var picker = $find(_RadDatePicker_ID);
    var calendar = picker.get_calendar();
    var fastNavigation = calendar._getFastNavigation();
 
fastNavigation.OnOK =
        function () {
            var date = new Date(fastNavigation.Year, fastNavigation.Month, 1);
            picker.get_dateInput().set_selectedDate(date);
            fastNavigation.Popup.Hide();
            document.getElementById(_hiddenDate_ID).value = new Date().ticks(picker.get_selectedDate());
           
        };

This Bug occurs when calling the set_selectedDate(date)-Method and it only occurs when in korean culture. Other cultures ( e.g. german, us, polish, ...) work just fine with the Datepicker.

I am thankful for any suggestions on how to fix this.

Kind Regards,

Nicolas Hanstein

1 Answer, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 01 Nov 2013, 07:25 AM
Hi Nicolas,

I have tried your code in  Korean as well as  other culture. Here is the sample code snippet which works fine at my end.

JavaScript:
<script type="text/javascript">
    window.onload = function () {
        window.setTimeout(function () { setCalendarTable(); }, 200)
    }
    function setCalendarTable() {
        var  picker = $find("<%=RadDatePicker1.ClientID %>");
        var calendar = picker.get_calendar();
        var fastNavigation = calendar._getFastNavigation();
        fastNavigation.OnOK =
        function () {
            var date = new Date(fastNavigation.Year, fastNavigation.Month, 1);
            picker.get_dateInput().set_selectedDate(date);
            fastNavigation.Popup.Hide();
            document.getElementById("Hidden").value =picker.get_selectedDate();
        }
    }
</script>

Thanks,
Shinu.

Tags
Calendar
Asked by
Nicolas
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Share this question
or