ASP.NET Calendar - Knowledge Base

« Back to Knowledge Base list

Set absolute position


Is there a way to set position of calendar control to absolute?


Yes, the position can be set to absolute by using custom css styles. We need to set different css properties for DataePickerMode and CalendarMode.

For DatePickerMode set a custom class for calendar css property CSSDatePickerButton like this:

<obout:Calendar CSSDatePickerButton="customStyle1" ...  />

For CalendarMode set calendar css property CSSCalendar like this:

<obout:Calendar CSSCalendar="customStyle1"  ....  />

Add the following sample style to your page to see how it works:

  <style type="text/css">

              position:absolute !important;
              left: 400px !important;
              top: 70px !important;