Fixed bug where the onchange func was called twice

Caused by blurring input and clicking a date on calendar

Closes #6