Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
2515
igDatePicker exhibiting odd behavior.
posted

I'm trying to migrate some code from 2014.2 to 2015.2. I'm using an igDatePicker. Everything works for 2014.2, but I get odd behavior with 2015.2. I don't know how to get the desired behavior. Whether I set EnableUTCDates to true or false the behavior is wrong.

To test my code I'm pointing to the lastest 2015.2 code.

Here is one scenario:

1. I set the DatePicker value to null.

2. I select date 7/1/2000 in the dropdown and that is what appears in the field for the datepicker. The calendar disappears (as expected).

3. I click the button to show the calendar again and the date is 6/30/2000, one day earlier.

Set dateInputFormat to "dateTime" I get the following result. I start with the date set to null.

1. I select date 7/1/2000. The date that show is 7/1/2000 xx:xx xx, where xx:xx xx is whatever the current time is.

2. I modify the time to be 7/1/2000 00:00 AM.

3. I click the button to display the calendar and the time immediately changes back to xx:xx xx. Not the current time, but the default time that originally appeared in step 1.

4. If I programmatically set the date to 7/1/2000 00:00 AM it shows the previous day when the calendar is displayed.

<script src="http://cdn-na.infragistics.com/igniteui/2015.2/latest/js/infragistics.core.js"></script>
<script src="http://cdn-na.infragistics.com/igniteui/2015.2/latest/js/infragistics.lob.js"></script>

<link href="http://cdn-na.infragistics.com/igniteui/2015.2/latest/css/themes/infragistics/infragistics.theme.css" rel="stylesheet" />
<link href="http://cdn-na.infragistics.com/igniteui/2015.2/latest/css/structure/infragistics.css" rel="stylesheet" />

$("#dte").igDatePicker({
   placeHolder: "Select Date...",
   readOnly: false,
   dateInputFormat: "date",
   enableUTCDates: true,
   focusOnDropDownOpen: true,
   mode: "editable",
   required: true,
   value: null,
   tabIndex: 20,

});