Initial value unix epoch
Tampa opened this issue · 1 comments
Putting the epoch into the value part of the input I get it converted when I click on the field(not automatically though), but placing it inside initialValue: for rome the input field remains blank. It seems to fetch it fine as soon as I click the field, but doesn't initially populate anything.
<input id="datetime" class="input" data-rome-id="0">
document.addEventListener('DOMContentLoaded', initload, false);
function initload () {
rome(datetime, { initialValue: '<?php echo $dateUTC; ?>' });
}
What am I doing wrong here?
I had to solve this by adding the timezone offset from moment to the return form. How is it that it simply cannot "just" convert a unix epoch to that particular time without using javascript's time objects, which get localized. Moment already supports changing timezones to force UTC, so adding an option to rome to force a certain timezone should be relatively easy?
Though it would seem this project isn't maintained anymore? @bevacqua