- Update internal date on blur. (user are allowed to change the textb…
Hello, I was working in some good improvements, could you consider it to merge? I include samples and unit tests.
- Update internal date on blur. (user are allowed to change the textbox and model are updated according)
- shows the default date selected on start.
- Set to null date if control is empty or is cleared.
- allow more than one button with different views, for example one button open month view and other button open day view to select only the hour, by adding special attributes to each button; examples are provideds in knockout folder.
- Add support for ReferenceDate, if ReferenceDate is present, then all calculations of -1d-1y+1m, etc are going to be applied in relation to this field, if ReferenceDate is not present, then the default behavior is expected (based on current local datetime)
- Add support for formats: 16JUL2006,16-JUL-2006,16/JUL/2006,16.JUL.2006 with or without TIME. (hh:ii or hh:ii:ss or hh:ii AM/PM or hh:ii:ss AM/PM)
- Adjust currentDate if StartDate and EndDate changes.
New methods:
-
getStartDate - Return the StartDate in localtime (exactly how is displayed in the calendar)
-
getStartUTCDate - Return the StartDate in UTC.
-
getEndDate - Return the EndDate in localtime (exactly how is displayed in the calendar)
-
getEndUTCDate - Return the EndDate in UTC.
-
getReferenceDate - Return the referenceDate in localtime.
-
getReferenceUTCDate - Return the referenceDate in UTC.
-
setStartDate - Set the StartDate in localtime.
-
setStartUTCDate - Set the StartDate in UTC.
-
setEndDate - Set the EndDate in localtime.
-
setEndUTCDate - Set the EndDate in UTC.
-
setReferenceDate - Set the referenceDate in localtime.
-
setReferenceUTCDate - Set the referenceDate in UTC.
-
Add knockout custom binding and a sample of use.
-
Add some tests.
-
Adjust some tests that depend on UTC handling.
-
All tests pass.
Regards Israel.