3
votes

I'm using this plugin for a date picker.

http://www.kelvinluck.com/assets/jquery/datePicker/v2/demo/datePicker.html

I need to have the default value of the text box be mm/dd/yyyy (kinda like value="mm/dd/yyyy").

So when I click on the field or calendar icon, the default value goes away and the date picker appears for me to pick the date.

Any ideas?

2
I would love to add this as well - mbdev

2 Answers

1
votes

You can use the dateFormat and altField options of the date picker for this:

http://docs.jquery.com/UI/Datepicker

0
votes

If kelvinluck date-picker does not have a support for default value. You can set your date input form to the current date; if you are using PHP you can do this:

<input name="mydate" class=".date-pick" value="<?php echo date("m-d-Y"); ?>" />

I am sure the date picker will automatically recognize the default value you've set.