Skip to content

defaultValue when focus #635

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

Open
WiCD opened this issue Sep 5, 2013 · 5 comments
Open

defaultValue when focus #635

WiCD opened this issue Sep 5, 2013 · 5 comments

Comments

@WiCD
Copy link

WiCD commented Sep 5, 2013

I don't want the default value of 'date + " 00:00"', placed in when focused, and defaultValue option didn't work.

$(...).datetimepicker( {
defaultValue: "" // null didn't work either...
})

@UOAlien
Copy link

UOAlien commented Sep 9, 2013

I'll confirm this. Even with defaultValue set to null (default), clicking on a textbox with a timepicker will set it to midnight.

I've tracked this down to line 500-504 (of the current version):

if (this.inst !== null) {
    var timeDefined = this.timeDefined;
    this._onTimeChange();
    this.timeDefined = timeDefined;
}

I commented out the this._onTimeChange(); and it stopped it from happening. Is there any way we can make the 'close' (Done) button set the textbox to what is selected?

@UOAlien
Copy link

UOAlien commented Sep 9, 2013

Commenting out that line breaks manually changing the text, though :(

@WiCD
Copy link
Author

WiCD commented Sep 9, 2013

im temporarily using this form to avoid the default value:

$("#dt").datetimepicker( {
        timezone : 'GMT',
        timezoneList : [ {
            value : 'GMT',
            label : "GMT"
        }]
    });

@WiCD
Copy link
Author

WiCD commented Sep 9, 2013

notice that, if there's no 'z' (Timezone) in timeFormat, it won't provide a timezone drop list, so it looks just fine

@judgedim
Copy link

judgedim commented Oct 4, 2013

I think fixed in #648

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

No branches or pull requests

3 participants