Opened 8 years ago

Closed 7 years ago

Last modified 7 years ago

#14859 closed enhancement (fixed)

TimeTextBox: No strikethrough for forbidden values

Reported by: Paul Christopher Owned by: Douglas Hays
Priority: undecided Milestone: 1.8
Component: Dijit - Form Version: 1.7.2
Keywords: Cc:
Blocked By: Blocking:

Description

Description

If you set constraints (min/max time) for a TimeTextBox, forbidden values are not grayed out/ marked with a strikethrough like in DateTextBox. From the point of view of a consistent user experience, strikethrough would be desirable IMHO.

Steps to reproduce the issue

Place a TimeTextBox and a DateTextBox next to each other in a form. Set some min/max constraints on both widgets. Now use the mouse to select values from the select area of these widgets. DateTextBox grays out/ marks forbidden values with a strikethrough. TimeTextBox does nothing of that but seems just to remove the onclick-handler/ onkeypress-handler.

Discussion

Would be nice to have the same behaviour in both widgets: forbidden values grayed out / marked with a strikethrough.

Change History (9)

comment:1 Changed 8 years ago by Douglas Hays

Resolution: patchwelcome
Status: newclosed
Type: defectenhancement

comment:2 Changed 8 years ago by Paul Christopher

I think you can fix it by simply adding the appropriate css styles to TimePicker.less, e.g. for claro

.claro .dijitTimePickerItemDisabled {
     color: @disabled-text-color;
     text-decoration:line-through;
}

And here is the disclaimer ;-)

BECAUSE THIS PATCH IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PATCH, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE SOFTWARE "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PATCH IS WITH YOU. SHOULD THE PATCH PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR, OR CORRECTION.

IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PATCH AS PERMITTED BY THE ABOVE LICENCE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PATCH (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PATCH TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.

comment:3 Changed 8 years ago by Douglas Hays

Paul, will you please send in a signed CLA: http://dojofoundation.org/media/documents/dojo-cla.pdf ?

comment:4 Changed 8 years ago by Paul Christopher

Are you serious? That's was only a joke with the disclaimer. And the patch was not really a patch, was it? Just a hint.. But of course, I can do that...

comment:5 Changed 8 years ago by Douglas Hays

Sorry, not kidding. Since you appended alternate license text (even as a joke) which cannot be removed, your code cannot be integrated into Dojo.

comment:6 Changed 8 years ago by Paul Christopher

Ok Doug, I have just sent in the CLA by e-mail. It would be cool, if TimeTextBox could be "made consistent" with DateTextBox for future versions of Dojo (as suggested by the patch).

comment:7 Changed 7 years ago by Douglas Hays

Milestone: tbd1.8
Resolution: patchwelcome
Status: closedreopened

comment:8 Changed 7 years ago by Douglas Hays

Resolution: fixed
Status: reopenedclosed

In [28062]:

Fixes #14859. Add strikethru/disabled styling to times outside min/max. Thanks Oliver (CLA on file).

comment:9 Changed 7 years ago by Douglas Hays

In [28063]:

Refs #14859. Remove less reference and use default gray for disabled text color.

Note: See TracTickets for help on using tickets.