Constrain dates

As promised: rebased and refactored, should take care of #7
Adds min/max functions to set up the valid date range. Supports reverted ranges (where everything outside of the max-min is valid).
Examples added (in example.html) and documentation updated (in Readme.md).