Basic Date Picker Documentation

BasicDatePicker.SelectedDateTimeFormatted Property

Gets the formatted SelectedDate and concatinated SelectedTime as string based on the DateFormat and TimeFormat.

[Visual Basic]
Public ReadOnly Property SelectedDateTimeFormatted As String
[C#]
public string SelectedDateTimeFormatted {get;}

Property Value

A String object that represents the selected date formatted as specified by the DateFormat or DateFormat properties.

Example

The following example demonstrates how to use the SelectedDateTimeFormatted SelectedDateTimeFormattedproperty to get the full formatted DateTime SelectedDatevalue.

[CS]
[Visual Basic, C#]
    
[CS]
[Visual Basic]
<%@ Page Language="VB" AutoEventWireup="true" <see cref="> <"/>@ Register TagPrefix="bdp" Namespace="BasicFrame.WebControls" Assembly="BasicFrame.WebControls.BasicDatePicker" %>
<html>
 <head>
    <title>Basic Date Picker SelectedDateFormatted Example</title>
     <script runat="server">
        Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
            If Not IsPostBack Then
                ' Set SelectedDate to Today
                this.BasicDatePicker1.SelectedDate = DateTime.Today
            End If
        End Sub
        
        Sub Selection_Change(sender As Object, e As EventArgs) 
            Response.Write("You picked: " + Me.BasicDatePicker1.SelectedDateFormatted)
        End Sub
     </script>
 </head>
 <body>
     <form runat="server">
         <h3>Basic Date Picker SelectedDateFormatted Example</h3>
         <bdp:BasicDatePicker 
             ID="BasicDatePicker1" 
             OnSelectionChanged="Selection_Change" 
             AutoPostBack="true" 
             runat="server"></bdp:BasicDatePicker>
     </form>
 </body>
</html>
 
[C#]
<%@ Page Language="C#" AutoEventWireup="true" <see cref="> <"/>@ Register TagPrefix="bdp" Namespace="BasicFrame.WebControls" Assembly="BasicFrame.WebControls.BasicDatePicker" %>
<html>
 <head>
    <title>Basic Date Picker SelectedDateFormatted Example</title>
     <script runat="server">
        void Page_Load(Object sender, EventArgs e)
        {
            // Set SelectedDate to Today
            if (!IsPostBack)
                this.BasicDatePicker1.SelectedDate = DateTime.Today;
        }
        
        private void Selection_Change(object sender, EventArgs e)
        {
            Response.Write("You picked: " + this.BasicDatePicker1.SelectedDateFormatted);
        }    
     </script>
 </head>
 <body>
     <form runat="server">
         <h3>Basic Date Picker SelectedDateFormatted Example</h3>
         <bdp:BasicDatePicker 
             ID="BasicDatePicker1" 
             OnSelectionChanged="Selection_Change" 
             AutoPostBack="true" 
             runat="server"></bdp:BasicDatePicker>
     </form>
 </body>
</html>
    
[CS]
[Visual Basic, C#]
    

See Also

BasicDatePicker Class | BasicFrame.WebControls Namespace | SelectedDate