Translatet Datepicker Function to CoffeeScript