You could use Calender, TextBox and Button control to achieve the datepicker effect.
First, set the calender to invisible.
Then in the button click event to make the calender visible.
And in the calender's SelectionChanged event to get the selected date.
Here is a simple demo and hope this will be helpfu to you.
.aspx
<form id="form1" runat="server">
<div>
<asp:Calendar ID="Calendar1" runat="server" Visible="false" OnSelectionChanged="Calendar1_SelectionChanged"></asp:Calendar>
</div>
<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
<asp:Button ID="Button1" runat="server" Text="GetDate" OnClick="Button1_Click"/>
</form>
code-behind.
protected void Button1_Click(object sender,
2023 calendar printable EventArgs e)
{
Calendar1.Visible = true;
}
protected void Calendar1_SelectionChanged(object sender, EventArgs e)
{
TextBox1.Text = Calendar1.SelectedDate.ToShortDateString();
Calendar1.Visible = false;
}
result: