0
我想知道如何將時間選擇器集成到應用程序中。我想要實現的是能夠添加旅程創建的出發時間和到達時間。我已經設置了模型中的日期,但現在我堅持如何爲此創建時間。MVC如何添加TimePicker
型號:
[Key]
public int JourneyId { get; set; }
public string Description { get; set; }
[DataType(DataType.Date)]
[DisplayFormat(DataFormatString = "{0:dd/MM/yyyy}", ApplyFormatInEditMode = true)]
public DateTime Departure { get; set; }
[DataType(DataType.DateTime)]
[DisplayFormat(DataFormatString = "{0:dd/MM/yyyy}", ApplyFormatInEditMode = true)]
public DateTime Arrival { get; set; }
public string DepartingFrom { get; set; }
public string Destination { get; set; }
public int StationId { get; set; }
public int TrainId { get; set; }
public virtual Train Train { get; set; }
public virtual Station Station { get; set; }
任何幫助,請