NCAR / wrfcloud

WRF Cloud Framework
Apache License 2.0
14 stars 6 forks source link

Feature #188 restrict dates in forecast selector #213

Closed georgemccabe closed 1 year ago

georgemccabe commented 1 year ago

Closes #188

Restrict the dates that can be selected for Cycle Date in the Launch WRF page to no later than today's date and not before Feb. 26, 2021 because the input data is not available in S3 before that date.

NOTE: WebStorm reports an error when the min/max values are added to the HTML. Apparently this is a bug as the syntax works as expected (see this comment).

Expected Differences

Pull Request Testing

Started angular locally and confirmed that the date selector is properly restricted.

Test locally if desired

Pull Request Checklist

georgemccabe commented 1 year ago

@hahnd, I made the updates you suggested. A good test would be to start angular, open the date selector, and see if the next date becomes select-able at 6pm MST. I tested using time offsets and it appeared to be properly using the UTC time to determine the last date.

georgemccabe commented 1 year ago

@hahnd , also note I had to set this.minDate and this.maxDate in the constructor because it complained that those variables aren't necessarily set in the constructor even though the constructor called the function that sets them.