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

Usage of html5-date field #1149

Open
MartinWeidner opened this issue Oct 17, 2019 · 1 comment
Open

Usage of html5-date field #1149

MartinWeidner opened this issue Oct 17, 2019 · 1 comment

Comments

@MartinWeidner
Copy link

MartinWeidner commented Oct 17, 2019

Hi,
i need the possibilty to show the default html5-date field when inline editing?
is that possible? is there a workaround?

i tried the usage of textfield with custom tpl:

$('.editable-date').editable({ type: 'text', tpl: '<input type="date">', });

But now, I have another issue. The date for input field musst be in format yyyy-mm-dd, but before editing it must shown in german format (dd.mm.yyyy). How can I make this possible?

thanks in advance

@MartinWeidner
Copy link
Author

Ok, I found a workaround:

            $('.editable-date').editable({
                type: 'text',
                tpl: '<input type="date">',
                display: function (value) {
                    var german_date = value.split("-");
                    $(this).text(german_date[2] + "." + german_date[1] + "." + german_date[0]);
                },
            });

But it would be still nice to have html5-date out of the box.

Thanks in advance

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

1 participant