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

datepicker / dateTimePicker label missing from taglib #474

Closed
NicolaIsotta opened this issue Jul 26, 2016 · 8 comments
Closed

datepicker / dateTimePicker label missing from taglib #474

NicolaIsotta opened this issue Jul 26, 2016 · 8 comments
Assignees
Milestone

Comments

@NicolaIsotta
Copy link
Contributor

NicolaIsotta commented Jul 26, 2016

The "label" attribute is missing from the taglib for these components, so the IDE complains:
missing attribute
Also, these components does not automatically generate the <label> element before. Is this a wanted behavior?

@stephanrauh stephanrauh added this to the v1.0.0 milestone Jul 26, 2016
@stephanrauh stephanrauh self-assigned this Jul 26, 2016
@stephanrauh
Copy link
Collaborator

It's interesting that two components that are so different suffer from the same bug. We've decided to deprecate the b:datePicker in favor of the b:dateTimePicker. The new component is every bit as powerful as the old one, but it doesn't require jQueryUI.

Currently, the label attribute isn't used by the DatePicker. Nor is it used by the DateTimePicker. That's why your IDE is complaining. It's right :).

I've added support for the label to b:dateTimePicker this evening. Along the way, I've noticed that the component should always be embedded by <div class="form-group">. If you prefer inline forms, it should also be embedded in a <div class="form-inline">. You did this in your example manually, but that should be code generated by the component itself. Do you agree?

@NicolaIsotta
Copy link
Contributor Author

Currently, the label attribute isn't used by the DatePicker. Nor is it used by the DateTimePicker. That's why your IDE is complaining. It's right :).

Actually, it's used by validation messages (that's why I thought it was missing from taglib).

Along the way, I've noticed that the component should always be embedded by <div class="form-group">. If you prefer inline forms, it should also be embedded in a <div class="form-inline">. You did this in your example manually, but that should be code generated by the component itself. Do you agree?

Yep.

Another thing. I've noticed the <input> generated part of the dateTimePicker doesn't allow direct keyboard input because of the z-index. Is this wanted? And is it possible to clear the <input> value?

stephanrauh added a commit that referenced this issue Jul 27, 2016
stephanrauh added a commit that referenced this issue Jul 27, 2016
@stephanrauh
Copy link
Collaborator

Keyboard input should be allowed. Let's see what we can do about it.

@NicolaIsotta
Copy link
Contributor Author

NicolaIsotta commented Jul 27, 2016

I forgot to add keyboard input doesn't work only if the component is inside a p:dialog. IDK if it works with b:modal because I'm stuck with p:dialog for validation.

@stephanrauh
Copy link
Collaborator

I've tried to investigate the z-index. As far as I can see, the z-index of prime:dialog is in the 1002 range. The z-index of the dateTimePicker is set to 2 in the core.css (i.e. a Bootstrap file). I take it raising the z-index to - say- 2000 should do the trick? We did this for b:datePicker (see https://github.com/TheCoder4eu/BootsFaces-OSP/blob/master/gradleResources/staticResources/css/bsf.css, lines 35ff).

@NicolaIsotta
Copy link
Contributor Author

NicolaIsotta commented Jul 28, 2016

Setting the z-index to 2000 would cause this:
2000
z-index: inherit !important; seems to work instead.

@TheCoder4eu TheCoder4eu self-assigned this Jul 28, 2016
@TheCoder4eu TheCoder4eu modified the milestones: v1.1.0, v1.0.0 Oct 23, 2016
@NicolaIsotta
Copy link
Contributor Author

NicolaIsotta commented Jan 7, 2017

I guess this can be closed @stephanrauh @TheCoder4eu

@stephanrauh
Copy link
Collaborator

I think so, too.

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

No branches or pull requests

3 participants