0

I want to select date and time in the format yyyy-mm-dd hh:mm:ss from UI and pass the same as parameters to REST POST call using ajax.

I am using IgniteUI.

Please help me how to use igDatePicker for given format.

I have tried the basic example as shown below:

<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>

My doubt is, it gives date and time in yyyy/mm/dd hh:mm AM format. Where can I edit the format to get hh:mm:ss time format?

The below code lets me select date and time in required format, but it gives the calender to select only data and with default time:

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

Any idea on how to use datepicker control tab even to select time? Does IgniteUi give such support to select time?

Wtower
  • 18,848
  • 11
  • 103
  • 80
  • Try this post: http://stackoverflow.com/questions/1328025/jquery-ui-datepicker-change-date-format – Spade Jul 06 '15 at 07:48
  • Welcome to Stack Overflow! Please do not post additional information as comments when asked, simply edit in your question and provide all details. I edited your question to include the details from your comments. I also edited the title and several parts of your question to improve readability. Good luck! – Wtower Jul 08 '15 at 08:08

0 Answers0