2017-06-14 12:28:08 +02:00
|
|
|
@model DateTimeChooserViewModel
|
2017-07-02 01:45:10 +02:00
|
|
|
@{
|
|
|
|
|
var dtpid = $"dtpckr{Model.InputId}";
|
2017-10-22 19:18:14 +02:00
|
|
|
var currentUICulture = System.Globalization.CultureInfo.CurrentUICulture;
|
2017-07-02 01:45:10 +02:00
|
|
|
}
|
2017-06-14 12:28:08 +02:00
|
|
|
|
2017-10-22 19:18:14 +02:00
|
|
|
<div class='input-group date' data-provide="datepicker-inline" id="@dtpid">
|
2017-07-02 01:45:10 +02:00
|
|
|
<input class="form-control " name="@Model.InputId" id="@Model.InputId" />
|
2017-06-25 11:33:40 +02:00
|
|
|
<span class="input-group-addon">
|
|
|
|
|
<span class="glyphicon glyphicon-calendar"></span>
|
|
|
|
|
</span>
|
|
|
|
|
</div>
|
2017-07-02 01:45:10 +02:00
|
|
|
<script type="text/javascript">
|
|
|
|
|
$(function () {
|
|
|
|
|
$(@Html.Raw("'#"+dtpid+"'")).datetimepicker({
|
2017-10-22 19:18:14 +02:00
|
|
|
locale: '@currentUICulture.Name',
|
2017-07-02 01:45:10 +02:00
|
|
|
disabledDates: @Html.Raw(Newtonsoft.Json.JsonConvert.SerializeObject(Model.BusyDates)),
|
2017-10-22 19:18:14 +02:00
|
|
|
maxDate: '@Model.MaxDate.ToString("MM/dd/yyyy",currentUICulture)',
|
|
|
|
|
minDate: '@Model.MinDate.ToString("MM/dd/yyyy",currentUICulture)',
|
2017-07-05 15:47:22 +02:00
|
|
|
format: 'MM/DD/YYYY HH:mm'
|
2017-07-02 01:45:10 +02:00
|
|
|
});
|
|
|
|
|
});
|
2017-07-03 15:54:18 +02:00
|
|
|
</script>
|