Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Synchronicity loss #7

Open
davidtaubmann opened this issue Mar 15, 2017 · 5 comments
Open

Synchronicity loss #7

davidtaubmann opened this issue Mar 15, 2017 · 5 comments
Labels

Comments

@davidtaubmann
Copy link

davidtaubmann commented Mar 15, 2017

We've tested your DateTime Picker watching it has an issue directly in your test: Upon customization of settings it losses synchronicity with the output fields.
This means: in your example site (http://mtrdesign.github.io/mtr-datepicker/demo.html), after loading, every change on date or time updates the output correctly, but once we interact with any customization checkbox, the outputs stops to update the result.

We had a similar issue with the implementation of your DateTime Picker in a WebApp... To reduce possibilities we've set only the target in config settings, but anyways upon loading, the fields stay always in 1st Jan 2000 1:00 AM, and once using arrows in any field, only THAT field jumps to the value it should really have (actual date) and makes the change solicited by the arrow clicked (example: loads in 1/1/2000 1:00:00, console output says 15/3/2017 4:30:00, when clicking arrow up in day it changes to 16 and console gives 16/3/2019 4:30:00, but all other fields stay in minimum showing 16th Jan 2000 1:00 AM).
We have been trying to replicate the error outside the WebApp under the same conditions (asynchronous loads and everything else in identical structure) but the error doesn't appears outside the WebApp.

Do you know what kind of conflict could be creating this problem? How could we find some other types of conflict for this in the developer console if there's no JS error or alert?

@valkirilov valkirilov added the bug label Mar 16, 2017
@davidtaubmann
Copy link
Author

I've seen you considered this a Bug....

One question... I believe you didn't have this trouble within your Demo in previous versions, so maybe the problem could come from a change in recent versions or in browsers recent changes (much less probable since Chrome and Firefox do the same).

I hope to be of help in this, personally I would prefer to solve our need with your picker, it's almost the only one that passed our tests previous to insertion in the WebApp.

Good Day.

@valkirilov
Copy link
Collaborator

Hi @davidtaubmann,

there is a new version of the datepicker (v0.3.7) and the bugs with the synchronization between the datepicker and the output are fixed (at least in our demo page).

If you still use our lib you could update your local version to the latest BETA and check the behavior of the datepicker in your use case. If you still experience any issues it would be great if you could provide an example (codepen, jsfillde, etc.) where we can debug it easily. Thank you.

@ghost
Copy link

ghost commented Oct 16, 2018

I have the same issue. I have set "future: true".
when my page is loaded, if I do not click the time area then the time isn't right as same as the http://mtrdesign.github.io/mtr-datepicker/demo.html demo page(Only future dates ).but the the output is always right.

slice 1

How can I make the default page time to right?
@valkirilov @milenski @Kras4ooo @mukareste @davidtaubmann

P.s. I install module with
bower install --save mtr-datepicker
And I use the master's latest code.

@valkirilov
Copy link
Collaborator

Hi @didichaoren,

please can you post a snippet with the configuration settings which you use to init the datepicker?

@ghost
Copy link

ghost commented Oct 18, 2018

HI, @valkirilov

I did this↓

HTML

<div id="mtr-datepicker"></div>
<input type="hidden" class="time-picker" id="time-picker" value=""/>

JS

var config = {
    target: 'mtr-datepicker',
    smartHours: true,
    future: true,
    // timestamp: dateNow.getTime(),
    // disableAmPm: true
};
var myDatepicker = new MtrDatepicker(config);

myDatepicker.onChange('time', function () {
    var datepickerOutput = myDatepicker.toTimeString();
    console.log(datepickerOutput);

    var time_picker = document.getElementById("time-picker");
    time_picker.value = datepickerOutput;
});

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants