我正在开发使用ASP.Net和jQuery我的网站。我使用的是每月选取器控件。我希望把旁边的按钮,输入显示的日期。谁能帮我?
<div class="col-lg-3">
@Html.TextBox("IconDemo", DateTime.Today.ToString("MM/yyyy"), new { @id = "IconDemo", @class = "Default form-control form-control-sm", @readonly = true })
</div>
$("#IconDemo").MonthPicker({
Button: "<button id='btmonthpicker' class='btn btn-warning btn-sm' ><i class='fa fa-calendar'></i></button>",
Position: {
collision: 'fit',
at: 'left top',
my: 'left bottom',
of: $('#IconDemo')
},
format: "mm-yy",
startView: "months",
minViewMode: "months",
MaxMonth: 0,
MaxYear: 0,
});
我找到这个问题的解决方案
<div class="col-lg-3">
<div class="pull-right">
@Html.TextBox("IconDemo", DateTime.Today.ToString("MM/yyyy"), new { @id = "IconDemo", @class = "Default form-control form-control-sm", @readonly = true })
</div>
</div>
它只是添加类上拉右包含日期选择器在div