add js date range function to input form