any particular reason you don't just drop in a plane jane textbox, and set it to as date?
Like this:
<h4>Enter Date</h4>
<asp:TextBox ID="txtDate" runat="server" TextMode="Date">
</asp:TextBox>
and thus we get this:

so, with above, the text box is still the text box, but also is the datepicker.
Edit#2: Select date on one page, pass to next page.
Ok, so we going to select a date on one page. Jump to next page.
On next page, we have a text box to select the date (or pass from previous page).
Also, when we update/change this text box, we want to re-load the grid data based on this text box.
So, first page we have this:
Text box, and button to jump to next page
<h4>Select date</h4>
<asp:TextBox ID="TextBox1" runat="server"
TextMode="date"
>
</asp:TextBox>
<br />
<asp:Button ID="Button1" runat="server" Text="Submit"
cssClass="btn" OnClick="Button1_Click1"/>
our button click code for above button is this:
protected void Button1_Click1(object sender, EventArgs e)
{
Session["MyDate"] = TextBox1.Text;
Response.Redirect("WebForm2.aspx");
}
We now jump to page 2, and on first load (!IsPostback), then we have this code:
A date box above the grid (to filter),
And gridview.
<lable style="font-size:large">Bookings for</lable>
<asp:TextBox ID="TextBox1" runat="server"
textmode="Date" AutoPostBack="true"
OnTextChanged="TextBox1_TextChanged" Font-Size="Large"
></asp:TextBox>
<br />
<br />
<asp:GridView ID="GridView1" runat="server" CssClass="table" Width="40%" >
</asp:GridView>
and the code behind is this:
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
TextBox1.Text = (string)Session["MyDate"];
if (TextBox1.Text == "")
TextBox1.Text = DateTime.Today.ToString("yyyy-MM-dd");
LoadGrid();
}
}
void LoadGrid()
{
string strSQL =
@"SELECT * FROM vBookings WHERE @From = cast(FromDate as date)
ORDER BY FromDate";
using (SqlConnection conn = new SqlConnection(Properties.Settings.Default.TEST4))
{
using (SqlCommand cmdSQL = new SqlCommand(strSQL, conn))
{
conn.Open();
cmdSQL.Parameters.Add("@From", SqlDbType.DateTime).Value = TextBox1.Text;
DataTable rstData = new DataTable();
rstData.Load(cmdSQL.ExecuteReader());
GridView1.DataSource = rstData;
GridView1.DataBind();
}
}
}
the result looks like this:

So, I only have/need one text box. and I set autopostback = true.
So, the code for that text box is thus:
protected void TextBox1_TextChanged(object sender, EventArgs e)
{
LoadGrid();
}
So, whatever value you shove into that text box should persit, should survice any post-back on that page, and it should retain its value.
Of course, you cannot build a working asp.net page UNLESS your setup code for that page is in that ALL VERY important !IsPostBack code stub.
The last 200+ web pages I build ALL HAVE that !IsPostBack stub, and you cannot really quite build a working web page unless you include that code stub.
if you do not check if this is REALLY the first page load, then all of your setup code for the page will run again and again - overwriting any changes you might make to such pages.
the above code - tested and works just fine.
So, you should not have any issues setting the value of the text box on that current page, or even passing a value for the text box from the previous page.
However, you do need to ensure that you don't re-set the text box value on each page load - and hence the !IsPostBack stub.