且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

获取日期时间总是空回到MVC3中的控制器

更新时间:2023-02-25 16:46:44

只要收到错误消息说它不是有效日期,就需要指定日期选择器的格式:

As far as getting an error saying it isn't a valid date, you'll need to specify the format of the datepicker:

        $(document).ready(function () {
            $("#PostTime").datepicker({
                showOn: 'both',
                dateFormat: 'dd/mm/yy',
                buttonImage: "/content/img/calendar_icon.png"
            });
        });