I think you are going about this the wrong way. You don't want to get each part of either the current date or the entered date. You just want to know if the entered date is in the past or not:
Code:
<script type="text/javascript">
var dateString = '2010-01-02',
dateEntered = new Date(dateString.replace(/-/g, ',')),
currentDate = new Date();
alert(dateEntered < currentDate);
</script>
This will alert true for an entered date in the past, and for one that is the same date as the current date (except at precisely midnight), false for an entred date in the future or one entered at precisely midnight on the current date. I think you can adapt it to your purposes. If you want more help or have questions, let me know.
Bookmarks