Basic Date Picker Documentation

BasicDatePicker.CssClass Property

Gets or sets CSS class applied to the <span> tag that wraps the control.

[Visual Basic]
Overrides Public Property CssClass As String
[C#]
public override string CssClass {get; set;}

Property Value

Default value for the CssClass is basicdatepicker.

Remarks

The default CssClass value of basicdatepicker is contained in the basicdatepicker.css file. This file can be located within your wwwroot/aspnet_client/ directory.

Example

[Visual Basic, C#] The following example demonstrates how to use the CssClass property to define a custom CssClass . The new custom CssClass adds padding around the date picker and changes the background-color to light grey.

[Visual Basic]
<%@ Page Language="VB" AutoEventWireup="true" %>
<%@ Register TagPrefix="bdp" Namespace="BasicFrame.WebControls" Assembly="BasicFrame.WebControls.BasicDatePicker" %>
<html>
 <head>
    <title>Basic Date Picker CssClass Example</title>
     <style>
    .basicdatepicker_revised {
        padding: 15px;
        background-color: lightgrey;
        }
    </style>
 </head>
 <body>
     <form runat="server">
         <h3>Basic Date Picker CssClass Example</h3>
         <bdp:BasicDatePicker 
             ID="BasicDatePicker1" 
             runat="server"
             CssClass="basicdatepicker_revised">
         </bdp:BasicDatePicker>
     </form>
 </body>
</html>

[C#]
<%@ Page Language="C#" AutoEventWireup="true" %>
<%@ Register TagPrefix="bdp" Namespace="BasicFrame.WebControls" Assembly="BasicFrame.WebControls.BasicDatePicker" %>
<html>
 <head>
    <title>Basic Date Picker CssClass Example</title>
     <style>
    .basicdatepicker_revised {
        padding: 15px;
        background-color: lightgrey;
        }
    </style>
 </head>
 <body>
     <form runat="server">
         <h3>Basic Date Picker CssClass Example</h3>
         <bdp:BasicDatePicker 
             ID="BasicDatePicker1" 
             runat="server"
             CssClass="basicdatepicker_revised">
         </bdp:BasicDatePicker>
     </form>
 </body>
</html>

See Also

BasicDatePicker Class | BasicFrame.WebControls Namespace