I had need to give a month/year picker and I found this post:
Unfortunately, it doesn't play nicely if the user tries to modify the dates to be something other than the first of the month either by the "Today" button or by typing into the textbox. Attached is some slightly modified script where I've made this work for a "From" and "To" field where it also nicely handles a user modifying (whether on purpose or by accident) the day of the month. This script standardizes on the first of the month at 00:00:00.
Again, keep in mind that this script is for a slightly different page than that demo but it should be clear how to purge the script for the second field.