mirror of
https://github.com/status-im/fathom.git
synced 2025-03-01 03:20:27 +00:00
Merge branch 'master' into multiple-sites
* master: Use arrows (without alt) to go through date ranges
This commit is contained in:
commit
5abd1a7a8a
@ -162,7 +162,9 @@ class DatePicker extends Component {
|
||||
|
||||
@bind
|
||||
handleKeyPress(evt) {
|
||||
if( ! evt.altKey ) {
|
||||
// Don't handle input when the user is in a text field or text area.
|
||||
let tag = event.target.tagName;
|
||||
if(tag === "INPUT" || tag === "TEXTAREA") {
|
||||
return;
|
||||
}
|
||||
|
||||
@ -171,14 +173,14 @@ class DatePicker extends Component {
|
||||
let newStartDate, newEndDate;
|
||||
|
||||
switch(evt.keyCode) {
|
||||
// ALT + left-arrow
|
||||
// left-arrow
|
||||
case 37:
|
||||
newStartDate = new Date(+this.state.startDate - diff)
|
||||
newEndDate = new Date(+this.state.endDate - diff)
|
||||
this.setDateRange(newStartDate, newEndDate)
|
||||
break;
|
||||
|
||||
// ALT + right-arrow
|
||||
//right-arrow
|
||||
case 39:
|
||||
newStartDate = new Date(+this.state.startDate + diff)
|
||||
newEndDate = new Date(+this.state.endDate + diff)
|
||||
|
@ -138,7 +138,7 @@ class Dashboard extends Component {
|
||||
</div>
|
||||
|
||||
<div class="footer hide-on-mobile">
|
||||
<p>Use <strong>ALT + arrow-key</strong> to cycle through date ranges.</p>
|
||||
<p>Use <strong>the arrow keys</strong> to cycle through date ranges.</p>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user