Как я могу использовать datetime picker в моем представлении mvc.Как использовать datetime picker как editortemplate
EditorTemplate: Datetime.cshtml
@model DateTime?
@Html.TextBox("", Model.HasValue ? Model.Value.ToString("dd/MM/yyyy"):"", new { @class = "datefield" })
Model :
[Required]
public DateTime DateOfBirth { get; set; }.
Also jquery.ui.all.css is under my solution content>themes>base
Вот частичный вид, где необходима DatePicker.
@model PersonalDetails`
` @ Html.LabelFor (модель => model.DateOfBirth) @ Html.EditorFor (модель => model.DateOfBirth, новый {@placeholder = "Дата рождения", @class = "DateField", @ тип = "текст"})
@ Html.ValidationMessageFor (модель => model.DateOfBirth)
Here the date field is coming in the format specified in the Datetime editor template. But the calendor image is not coming.
Что не так с использованием [jQuery UI datepicker] (https://jqueryui.com/datepicker/) – Shyju
Вы попробовали свой пример кода? В чем проблема, с которой вы столкнулись? – Shyju
bootstrap не имеет датпикера. есть и другие люди, которые писали bootstrap datepickers. [Позвольте мне сделать это для вас] (https://www.google.com/#pws=0&q=bootstrap+datepicker+) – Shyju