Last active
August 17, 2020 10:01
-
-
Save okonet/64ddad32ec5753cdab12da7d4eb53a48 to your computer and use it in GitHub Desktop.
DateRangePicker
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DateRangePicker | |
DateNotSet | |
click -> StartDateEmpty | |
SelectStartDate | |
cancel -> DateNotSet | |
hoverQS -> QuickSelectHighlighted | |
hover -> StartDateHighlighted | |
# It be triggered after the MaskedInput is complete | |
typing -> StartDateValid? | |
StartDateEmpty* | |
StartDateValid? | |
valid -> SelectEndDate | |
invalid -> StartDateInvalid | |
StartDateInvalid | |
typing -> StartDateValid? | |
click -> SelectEndDate | |
StartDateHighlighted | |
click -> SelectEndDate | |
SelectEndDate | |
cancel -> DateNotSet | |
hoverQS -> QuickSelectHighlighted | |
hover -> EndDateHighlighted | |
typing -> EndDateValid? | |
focusStartDate -> SelectStartDate | |
EndDateEmpty | |
EndDateValid? | |
valid -> BothDatesValid | |
invalid -> EndDateInvalid | |
EndDateInvalid | |
EndDateHighlighted | |
click -> BothDatesValid | |
BothDatesValid | |
hoverQS -> QuickSelectHighlighted | |
apply -> DateRangeSet | |
cancel -> DateNotSet | |
# Do not erase user's input | |
focusStartDate -> SelectStartDate | |
# Do not erase user's input | |
focusEndDate -> SelectEndDate | |
QuickSelectHighlighted | |
click -> DateRangeSet | |
# Restore from a state snapshot | |
mouseOut -> BothDatesValid | |
DateRangeSet* | |
click -> BothDatesValid | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function render(model){ | |
if (model.active_states[0].image_url) { | |
return $("img", | |
{src: model.active_states[0].image_url, style: {height: "100%"}}); | |
} else { | |
return "No image available." | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment