views:

30

answers:

1

Hi,

How can i generate a dynamic calendar controls in Asp.net 2.0 or above?

Following requirements should be met

  1. Calendar Should NOT be an Asp.net default calendar control
  2. Calendar should NOT be created by using CALENDAR object (i.e. dim calendar1 = new calendar() )
  3. calendar Generated should display current month date (august 1 - august 31 2010) and top should display Next Month and Prev Month, which should then display July 2010 and September 2010 respectively.

Please help!

Thanks

A: 

So if you're using asp.net, but you don't want the calendar to be asp.net driven, then you're saying you want it to be 100% client side driven? It's not that hard to write a calendar control in javascript, but if you don't want to roll one yourself then check out the jquery UI library

http://jqueryui.com/

... which has a 100% javascript calendar control widget.

James Gaunt
any other than jQuery?
Romil Nagrani
Yes lots, just Google javascript date picker. I doubt there is that much to choose between them. If you want to keep things simple I would really recommend writing you own, it's fun exercise and should only be a couple of pages of javascript at most. The hardest part is figuring out what dates are needed for a given month, and how to align these with your day columns assuming these are fixed. The rendering of the result into an HTML table is trivial.
James Gaunt