-1

Html

   <input type="text" ID="txtDate"/>

jQuery

<script>
        $(document).ready(function () {
            $('#txtDate').datetimepicker({             
                mask: true,
                timepicker: false,
                format: 'd M Y',
                lang:'ar'
            });           
        });
 </script>

I am using Xdsoft datetime picker.

In English Language and Arabic Language, the Calender is displaying properly.

My issue is:

In English, it is displaying the selected Date in textbox properly as: 02 Nov 2015

But, In Arabic, it is displaying the selected Date in textbox as: 02 Nov 2015

I want the nov value in Arabic.

Please help guys!

Reference: http://xdsoft.net/jqplugins/datetimepicker/

Palpatim
  • 9,074
  • 35
  • 43
Billy
  • 825
  • 6
  • 21
  • 36

1 Answers1

1

From the docs:

!!! The latest version of the options 'lang' obsolete. The language setting is now global. !!!

Use this:

$.datetimepicker.setLocale('en');

So your setup code would need to change to:

    $(document).ready(function () {
        $.datetimepicker.setLocale('ar');
        $('#txtDate').datetimepicker({             
            mask: true,
            timepicker: false,
            format: 'd M Y',
            lang:'ar'
        });           
    });
Palpatim
  • 9,074
  • 35
  • 43