mirror of
https://github.com/discourse/discourse.git
synced 2025-02-10 05:14:59 +00:00
FIX: safari desktop doesnt support input[time] (#7719)
This commit attempts to improve the experience by: - showing time input as disabled on any platform if date hasn't been set - showing a placeholder --:-- to emphasize the expected format
This commit is contained in:
parent
8bd815dab2
commit
a652d620f6
@ -36,6 +36,8 @@ export default Ember.Component.extend({
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
timeInputDisabled: Ember.computed.empty("date"),
|
||||||
|
|
||||||
@observes("date", "time")
|
@observes("date", "time")
|
||||||
_updateInput() {
|
_updateInput() {
|
||||||
if (!this.date) {
|
if (!this.date) {
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
|
|
||||||
<div class="control-group">
|
<div class="control-group">
|
||||||
{{d-icon "far-clock"}}
|
{{d-icon "far-clock"}}
|
||||||
{{input type="time" value=time}}
|
{{input placeholder="--:--" type="time" value=time disabled=timeInputDisabled}}
|
||||||
</div>
|
</div>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
|
@ -49,6 +49,10 @@
|
|||||||
font-size: $font-up-1;
|
font-size: $font-up-1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
input[disabled] {
|
||||||
|
background: $primary-low;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
.pika-single {
|
.pika-single {
|
||||||
position: absolute !important; /* inline JS styles */
|
position: absolute !important; /* inline JS styles */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user