How do I use a calendar to pick a date on a web page?

I have a html page that contains startdate and enddate as custom inputs. I need to allow the user to select this data from the calendar, instead of requiring the user to enter dates. Is there anything you can suggest to help?

EDIT:

I have a HTML page:

StartDate: yyyy-mm-dd             EndDate: yyyy-mm-dd

      

Currenly these two fields are text fields.

I would like to implement this with a calendar control where the user can select any date from the calendar.

-1


source to share


3 answers


Check it out - http://www.xaprb.com/blog/2005/09/29/javascript-date-chooser/



By the way, you should be more clear and specific when asking your question.

+3


source


I think that after you start using controls like this, you should move on to using javascript libraries.

I recommend you jquery or YUI (you have more: prototype, mootools, etc.)

Specifically for the calendar control, you can use YUI , they have a special js for that. After downloading YUI, you can find it here: /yui/build/calendar-min.js and you have a very good example along the way: / yui / examples / calendar.



The method you use to create it: new YAHOO.widget.Calendar ("cal", "calendario", {LOCALE_WEEKDAYS: "1char", START_WEEKDAY: 1, mindate: "1/1/2008"});

If you prefer jquery, here's the calendar control:

http://ui.jquery.com/repository/tags/latest/demos/functional/#ui.datepicker

+3


source


If you are on ASP.NET you can use this one; http://ra-ajax.org/samples/Ajax-Calendar.aspx

I am working for Ra-Ajax BTW ...

0


source







All Articles