Skip to content

Commit f58dce4

Browse files
committed
Fix time period filter where date would change when focused (fbacchella#58)
When focusing a date or time input, we automatically set the autoperiod to '0' (meaning manual) but the comparison in 'onChange' callback would always fails and always update the input to the latest value. The comparison fails because 'value' is a string and '!==' means a strict equality of both value and type.
1 parent febd4fd commit f58dce4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

web/lib/jrds.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ return declare("Autoperiod", dijit.form.Select, {
3535
onChange: function(value) {
3636
queryParams.autoperiod = value;
3737
//value = 0 means manual time period, so don't mess with the period fields
38-
if(value !== 0) {
38+
if(value != 0) {
3939
getGraphList();
4040
// Refresh queryParams with the new time values
4141
var iq = dojo.xhrGet( {

0 commit comments

Comments
 (0)