Click here to Skip to main content
14,733,542 members
Please Sign up or sign in to vote.
3.67/5 (2 votes)
See more:
datepicker in gridview boundfield column
Krunal Rohit 10-Mar-14 5:01am

DipsMak 10-Mar-14 8:43am
you are asking solution like Tea..:)

1 solution

You need to add templete field in your grid view to do this. like
and include jquery liabrary:
<link rel="stylesheet" href="//">
 <script src="//"></script>
 <script src="//"></script>
 <link rel="stylesheet" href="/resources/demos/style.css">

<script type="text/javascript">
        $(document).ready(function () {
                dateFormat: "dd/mm/yy",
                changeMonth: true,
                changeYear: true

<asp:TemplateField HeaderText="Date" HeaderStyle-Width="10%" ControlStyle-Width="100%">
                                    <asp:TextBox ID="txtpaperdate1" runat="server" Text='<%#Bind("paperdate","{0:d}")%>'
                                         ToolTip="DD/MM/YYYY" DataFormatString="{0:d}" CssClass="myDatePickerClass input-sm"
                                    <asp:RequiredFieldValidator ID="RFVtxtpaperdate1" runat="server" ValidationGroup="updatevalidate"
                                        ControlToValidate="txtpaperdate1" Display="Dynamic" ForeColor="Red" ErrorMessage="Required"></asp:RequiredFieldValidator>
                                    <asp:Label ID="lblpaperdate" runat="server" Text='<%#Bind("paperdate","{0:d}")%>'
                                        ToolTip="DD/MM/YYYY" DataFormatString="{0:d}"></asp:Label>

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900