Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

jQuery UI Datepicker and datejs

I want to have a datepicker where you can also just type basically I want to have the jQuery UI Datepicker and datejs in one. I want to type "tomorrow" and I want it to select the right day. I want to be able to type "saturday" and it actually getting the date right.

like image 796
Thomaschaaf Avatar asked Dec 27 '08 18:12

Thomaschaaf


1 Answers

If you have any experience creating jQuery plugins, the work is not too difficult. Wrap the target input with the code required to create the UI datepicker AND value testing (with date.js) on keyup/blur/whichever events you deem necessary. You'll need to ensure that you set the date on the datepicker instance when the value changes (call datepicker("setDate", date))

I've done something very similar at work; If you are interested in the code, I should be able to make it available (in its current format - lacks a bit of polish but it's clear enough).

like image 81
Rob Cowie Avatar answered Oct 14 '22 01:10

Rob Cowie