私は MVC アプリケーションを開発しています。その中で datepicker を使用しています。日付ピッカーで 1930 年から 1995 年までの範囲を設定したいと考えています。選択した日付を 1995/1/1 に設定したい
次のコードを書きました。
$(document).ready(function () {
$(function () {
$('.BirthDate').datepicker({
dateFormat: "dd-M-y",
yearRange:'1930:1995',
buttonImage: '@Url.Content("~/Resource/Calender.jpg")',
buttonImageOnly: true
});
});
$(".BirthDate" ).datepicker( "setDate", "01/01/1995" );
});
しかし、機能していません...どのような変更を加える必要がありますか?