Change the language of datepicker
<p>I am trying to build a function that changes the language of date picker</p>

<pre><code>$(function(){
txtDate = $("#txtDate");
var minDate = new Date(2011, 1 - 1, 15);
var maxDate = new Date(2011, 6 - 1, 15);
txtDate.date
txtDate.dateEntry({
            defaultDate: maxDate,
            minDate: minDate,
            maxDate: maxDate,
            spinnerImage: ''
        });
txtDate.datepicker({
            minDate: minDate,
            maxDate: maxDate
        });

txtDate.datepicker("setDate", maxDate);
dateLanguageChange();
});


var dateLanguageChange = function () {
        $("#txtDate").datepicker("destroy").datepicker($.datepicker.regional["fr"]);
    };
</code></pre>

<p>html:</p>

<pre><code>&lt;div class="form-row"&gt;
    &lt;label&gt;@Html.Resource("Date")&lt;/label&gt;
    &lt;input id="txtDate" type="text" class="date-box" /&gt;
&lt;/div&gt;
</code></pre>
