smalot/bootstrap-datetimepicker — pull request #75 by liamdavies (2013-06-03 00:56:58+00:00)
Title: Fix issue #73 Setting an invalid day for the month results in incorrect date

Set the year and month before the day of month. By the time the day is being set the correct month will be set and the date will stay set correctly.