Basic Date Picker Documentation

BDPLite.DateFormat Property

Gets or sets a pre-packaged date format.

[Visual Basic]
Public Property DateFormat As DateFormat
[C#]
public DateFormat DateFormat {get; set;}

Property Value

One of the DateFormat enumeration values. The default is Default.

Remarks

Date Format Description
Default Date format = "d-MMM-yyy"; Display = 20-Feb-2005.
LongDate Uses Culture.DateTimeFormat.LongDatePattern. Example ("en-US"): Date format = "MMMM d, yyyy"; Output = February 20, 2005.
ShortDate Uses Culture.DateTimeFormat.ShortDatePattern. Example ("en-US"): Date format = "M/d/yyyy"; Output = 2/20/2005.

Example

[Visual Basic, C#] The following example demonstrates how to use the DateFormat property to display the date in the culture dependent ShortDatePattern.

[Visual Basic]
<%@ Page Language="VB" AutoEventWireup="true" %>
<%@ Register TagPrefix="bdp" Namespace="BasicFrame.WebControls" Assembly="BasicFrame.WebControls.BasicDatePicker" %>
<html>
 <head>
    <title>BDP Lite DateFormat Example</title>
     <style>
 </head>
 <body>
     <form runat="server">
         <h3>BDP Lite DateFormat Example</h3>
         <bdp:bdplite 
             ID="BDPLite1" 
             runat="server"
            DateFormat="ShortDate">
         </bdp:bdplite>
     </form>
 </body>
</html>
             
[C#]
<%@ Page Language="C#" AutoEventWireup="true" %>
<%@ Register TagPrefix="bdp" Namespace="BasicFrame.WebControls" Assembly="BasicFrame.WebControls.BasicDatePicker" %>
<html>
 <head>
    <title>BDP Lite DateFormat Example</title>
 </head>
 <body>
     <form runat="server">
         <h3>BDP Lite DateFormat Example</h3>
         <bdp:bdplite 
             ID="BDPLite1" 
             runat="server"
            DateFormat="ShortDate">
         </bdp:bdplite>
     </form>
 </body>
</html>

See Also

BDPLite Class | BasicFrame.WebControls Namespace