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

Empty value #33

Closed
brettpostin opened this issue Jan 26, 2018 · 7 comments
Closed

Empty value #33

brettpostin opened this issue Jan 26, 2018 · 7 comments

Comments

@brettpostin
Copy link

brettpostin commented Jan 26, 2018

Apologies if I've missed something, but I can't see a way to set an empty value?

In the absence of data I would like a blank field rather than it default to the current date/time.

Is there a way to achieve this?

@fooloomanzoo
Copy link
Owner

fooloomanzoo commented Jan 27, 2018

By default, today is the picked date, if not any attribute is set, but I might change that behaviour

@brettpostin
Copy link
Author

Ok thanks for the clarification.

I would love to use this element as it looks the most complete datetime picker available. However at present I cannot see how I would use this in a form where the field value may not be required.

I noticed there is a required property, what function does this serve if the field always has a value?

@fooloomanzoo
Copy link
Owner

The required property comes from my FormElementMixin and this mixin is used also by other input elements I made. For Polymer's iron-form-element it is required for an element to have a validate function and so I created this mixin and included some shared attributes. Formerly it did not have that attribute, but I look into it.

@brettpostin
Copy link
Author

Support for empty values would be a welcome addition.

@fooloomanzoo
Copy link
Owner

fooloomanzoo commented Feb 5, 2018

@brettpostin It should be possible with the new update. Please have a look at the demo

@brettpostin
Copy link
Author

Awesome thank you! Is there a way to clear the value back to empty once it has been set?

@fooloomanzoo
Copy link
Owner

Right and thanks, should be fixed in the current version

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

2 participants