Lock graph controls when selecting range.
Fix issue with third-party date picker.

 * Replace unsupported `Number.isNaN' function by `isNaN'.