0

我想yyyy-mm-dd hh:mm:ss从 UI 中选择格式的日期和时间,并使用 ajax 将与参数相同的参数传递给 REST POST 调用。

我正在使用 IgniteUI。

请帮助我如何使用igDatePicker给定的格式。

我已经尝试了如下所示的基本示例:

<html>
<head>
<style> 
    @media all and (max-width: 360px) { 
        .ui-datepicker { width: 250px; } 
    }
</style>
</head>
<body>
    <input id="datePicker" type="date" /> 
    <script> 
        $(function () { $("#datePicker").igDatePicker(); }); 
    </script>
</body>
</html>

我的疑问是,它以yyyy/mm/dd hh:mm AM格式给出日期和时间。我在哪里可以编辑格式以获取hh:mm:ss时间格式?

下面的代码让我选择所需格式的日期和时间,但它让日历只选择数据和默认时间:

$('#datePicker').igDatePicker({ 
    width: width, 
    dateInputFormat: 'dateTime', 
    required: true, 
    validatorOptions: { 
        onblur: true, 
        onchange: false, 
        onsubmit: true, 
        formSubmit: true, 
        keepFocus: "always",
        showIcon: true 
    }
});     

关于如何使用日期选择器控制选项卡甚至选择时间的任何想法?是否IgniteUi给予选择时间这样的支持?

4

0 回答 0