适用于MVC的DateTimePicker [英] DateTimePicker for MVC

查看:78
本文介绍了适用于MVC的DateTimePicker的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述





刚刚开始使用MVC,我正在寻找使用MVC3创建DateTimePicker的最简单方法。



简单地说这就是我要找的:

Hi,

Just started working with MVC and i'm currently looking for the easiest way to create a DateTimePicker using MVC3.

Simply said this is what I'm looking for:

@Html.DateTimePickerFor(m => m.BirthDay)



现在我知道这不存在了,但应该有类似这样的东西吗?



Willem


Now I know this doesn't exist, but there should be something simular like this?

Willem

推荐答案

如果这样的话可以帮助你: ASP.NET MVC中的JQueryUI Datepicker [ ^ ]



很少有博客讨论相同内容:

日期/时间选择器(ASP.NET MVC& jQuery) - 第1部分 [ ^ ]

ASP.Net MVC DatePicker [ ^ ]
See, if something like this helps you: JQueryUI Datepicker in ASP.NET MVC[^]

Few blogs discussing the same:
Date / Time Picker (ASP.NET MVC & jQuery) – Part 1[^]
ASP.Net MVC DatePicker[^]


如何在mvc 3中使用日期时间选择器
how to use date time picker in mvc 3


如果要同时使用日期和时间选择器,简单易行的方法是使用jquery UI timepicker add-on ,它适用于exisitng jquery datepicker。



解决方案

If you want to use both date and time picker at the same time, the simple and easy way is to use jquery UI timepicker add-on, it works with exisitng jquery datepicker.

solution
<script src="jquery.min.js"></script>
<script src="jquery-ui.min.js"></script>
<script src="jquery-ui-timepicker-addon.js"></script>





之后再称之为



After that call it

<script type="text/javascript">


这篇关于适用于MVC的DateTimePicker的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆