Now, when we know a lot about date handling, lets put it all together and create a page like the one above. It is much nicer for the user to select dates like this than entering it right into a simple text box. It is also a lot easier to ensure a correct date is entered.
In this little application we want the Fromdate to always show yesterday's date and the to date today's date.
With all the functions we have created it is actually very easy: