ASP.NET Calendar - Knowledge Base

« Back to Knowledge Base list

Set absolute position

Q:

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

A:

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">
        .customStyle1

        {
              position:absolute !important;
              left: 400px !important;
              top: 70px !important;
        }
  </style>