This is a migrated thread and some comments may be shown as answers.

Text Property Cannot be Set. String is not a valid datetime format

3 Answers 74 Views
Calendar
This is a migrated thread and some comments may be shown as answers.
Harry Cardillo
Top achievements
Rank 1
Harry Cardillo asked on 01 Feb 2010, 06:10 AM
I am trying to just get this page to render. I am not doing any databinding behind the scenes on the datetimepickers. But, if I remove them, then the page renders and I can bind the data when clicking the link in the gridview. Also, they render correctly when they are not inside an UpdatePanel. But inside the update panel, I get the error specified in the title. Can someone please help? Thanks

<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/nextEMRM.Master" 
    CodeBehind="scheduler.aspx.vb" Inherits="nextEMRWeb.scheduler" %> 
 
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %> 
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %> 
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server"
</asp:Content> 
<asp:Content ID="Content2" ContentPlaceHolderID="nextEMRContentPlaceHolder" runat="server"
    <style> 
        .updateProgress 
        { 
            border-width: 1px; 
            border-style: solid; 
            background-color: #CCCCCC; 
            position: absolute; 
            z-index: 100001; 
            width: 260px; 
            height: 100px; 
        } 
        .updateProgressMessage 
        { 
            margin: 3px; 
            font-family: Trebuchet MS; 
            font-size: small; 
            vertical-align: middle; 
        } 
    </style> 
    <input id="btnTrigger" runat="server" onserverclick="btnTrigger_Click" type="button" 
        style="display: none;" /> 
    <cc1:TabContainer ID="tabSchedulerContainer" runat="server" CssClass="TabControl" 
        OnClientActiveTabChanged="clientActiveTabChanged"
        <cc1:TabPanel ID="panelSearch" runat="server" HeaderText="Search"
            <HeaderTemplate> 
                Search 
            </HeaderTemplate> 
            <ContentTemplate> 
                <asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional"
                    <ContentTemplate> 
                        <asp:LinkButton ID="LinkButton1" runat="server" Style="display: none;">LinkButton</asp:LinkButton> 
                        <cc1:ModalPopupExtender ID="ModalPopupExtender1" runat="server" DropShadow="true" 
                            TargetControlID="LinkButton1" PopupControlID="pnlAppointment" BackgroundCssClass="modalBackground"
                        </cc1:ModalPopupExtender> 
                        <asp:Panel Style="display:none;" runat="server" ID="pnlAppointment" CssClass="modalPopup"
                            <table style="width: 401px; height: 186px"
                                <tr> 
                                    <td style="width: 122px"
                                        Provider : 
                                    </td> 
                                    <td style="width: 125px"
                                        <asp:DropDownList ID="providerDropDownList" runat="server" Width="180px" AppendDataBoundItems="true" 
                                            AutoPostBack="false" DataSourceID="providersObjectDataSource" DataTextField="fullname" 
                                            DataValueField="id"
                                            <asp:ListItem Value="0" Text="Select a Physician"></asp:ListItem> 
                                        </asp:DropDownList> 
                                    </td> 
                                </tr> 
                                <tr> 
                                    <td style="width: 122px"
                                        Start Time: 
                                    </td> 
                                    <td style="width: 122px"
                                        <telerik:RadDateTimePicker ID="radStartTime" runat="server"
                                        </telerik:RadDateTimePicker> 
                                    </td> 
                                </tr> 
                                <tr> 
                                    <td style="width: 122px"
                                        End Time: 
                                    </td> 
                                    <td style="width: 122px"
                                        <telerik:RadDateTimePicker ID="radEndTime" runat="server"
                                        </telerik:RadDateTimePicker> 
                                    </td> 
                                </tr> 
                                <tr> 
                                    <td style="width: 122px"
                                        Patient : 
                                    </td> 
                                    <td style="width: 125px"
                                        <asp:Label Visible="true" runat="server" ID="lblPatientID"></asp:Label><asp:Label 
                                            runat="server" ID="lblPatient"></asp:Label> 
                                    </td> 
                                </tr> 
                                <tr> 
                                    <td style="width: 122px"
                                        First Name : 
                                    </td> 
                                    <td style="width: 122px"
                                        <asp:TextBox ID="txtFName" runat="server" Width="180px" Enabled="false"></asp:TextBox> 
                                    </td> 
                                </tr> 
                                <tr> 
                                    <td style="width: 122px"
                                        Last Name : 
                                    </td> 
                                    <td style="width: 122px"
                                        <asp:TextBox ID="txtLName" runat="server" Width="180px" Enabled="false"></asp:TextBox> 
                                    </td> 
                                </tr> 
                                <tr> 
                                    <td style="width: 122px"
                                        Date Of Birth : 
                                    </td> 
                                    <td style="width: 122px"
                                        <asp:TextBox ID="txtDOB" runat="server" Width="180px" Enabled="false"></asp:TextBox> 
                                    </td> 
                                </tr> 
                                <tr> 
                                    <td style="width: 122px"
                                        Address : 
                                    </td> 
                                    <td style="width: 122px"
                                        <asp:TextBox ID="txtAddress" runat="server" Width="180px" Enabled="false"></asp:TextBox> 
                                    </td> 
                                </tr> 
                                <tr> 
                                    <td style="width: 122px"
                                        Town : 
                                    </td> 
                                    <td style="width: 122px"
                                        <asp:TextBox ID="txtTown" runat="server" Width="180px" Enabled="false"></asp:TextBox> 
                                    </td> 
                                </tr> 
                                <tr> 
                                    <td style="width: 122px; height: 1px"
                                        Zip Code : 
                                    </td> 
                                    <td style="width: 122px; height: 1px"
                                        <asp:TextBox ID="txtPostCode" runat="server" Width="180px" Enabled="false"></asp:TextBox> 
                                    </td> 
                                </tr> 
                                <tr> 
                                    <td style="width: 122px; height: 1px"
                                        Phone : 
                                    </td> 
                                    <td style="width: 122px; height: 1px"
                                        <asp:TextBox ID="txtPhone" runat="server" Width="180px" Enabled="false"></asp:TextBox> 
                                    </td> 
                                </tr> 
                                <tr> 
                                    <td style="width: 122px; height: 1px"
                                        Note : 
                                    </td> 
                                    <td style="width: 122px; height: 1px"
                                        <asp:TextBox ID="appointmentNoteTextBox" runat="server" TextMode="MultiLine" Rows="3" 
                                            Width="180px" Enabled="true"
                                        </asp:TextBox> 
                                    </td> 
                                </tr> 
                            </table> 
                        </asp:Panel>                         
                        <div> 
                            <p> 
                                &nbsp;</p> 
                            <p> 
                                <span class="fieldLabels">First Name: </span> 
                                <asp:TextBox ID="txtFirstName" runat="server"></asp:TextBox> 
                            </p> 
                            <p> 
                                <span class="fieldLabels">Last Name:</span><asp:TextBox ID="txtLastName" runat="server"></asp:TextBox> 
                            </p> 
                            <p> 
                                <span class="fieldLabels">City:</span><asp:TextBox ID="txtCity" runat="server"></asp:TextBox> 
                            </p> 
                            <p> 
                                <span class="fieldLabels">Zip:</span><asp:TextBox ID="txtZip" runat="server"></asp:TextBox> 
                            </p> 
                            <p> 
                                <span class="fieldLabels">&nbsp; </span> 
                                <asp:Button CssClass="firstBottomButtons" ID="btnSearchPatients" runat="server" Text="Search Patients" /> 
                            </p> 
                        </div> 
                        <p> 
                            <asp:GridView ID="patientGridView" runat="server" AutoGenerateColumns="False" DataSourceID="patientObjectDataSource" 
                                Visible="false" EmptyDataText="No Record Available" CssClass="grid2" RowStyle-Height="25" 
                                Width="98%" PageSize="10" OnRowCommand="patientGridView_RowCommand" AllowPaging="true" 
                                AlternatingRowStyle-BackColor="WhiteSmoke" HeaderStyle-BackColor="#ddedf3"
                                <Columns> 
                                    <asp:TemplateField> 
                                        <ItemTemplate> 
                                            <%#Eval("LastName") %>
                                            <%#Eval("FirstName")%> 
                                        </ItemTemplate> 
                                    </asp:TemplateField> 
                                    <asp:BoundField DataField="ssn" /> 
                                    <asp:BoundField DataField="dobStr" /> 
                                    <asp:BoundField DataField="city" /> 
                                    <asp:BoundField DataField="state" /> 
                                    <asp:BoundField DataField="zip" /> 
                                    <asp:TemplateField> 
                                        <ItemTemplate> 
                                            <asp:LinkButton CommandName="view" CommandArgument='<%#Eval("id") %>' ID="View" runat="server" 
                                                Text="View Appointments" /> 
                                            | 
                                            <asp:LinkButton CommandName="make" CommandArgument='<%#Eval("id") %>' ID="Make" runat="server" 
                                                Text="Make Appointment" /> 
                                        </ItemTemplate> 
                                    </asp:TemplateField> 
                                </Columns> 
                                <HeaderStyle BackColor="#DDEDF3" /> 
                                <AlternatingRowStyle BackColor="WhiteSmoke" /> 
                            </asp:GridView> 
                        </p> 
                    </ContentTemplate> 
                </asp:UpdatePanel> 
            </ContentTemplate> 
        </cc1:TabPanel> 
        <cc1:TabPanel ID="panelCalendar" runat="server" HeaderText="Calendar"
            <ContentTemplate> 
                <asp:UpdatePanel ID="UpdatePanel3" runat="server" UpdateMode="Conditional"
                    <Triggers> 
                        <asp:AsyncPostBackTrigger ControlID="btnTrigger" /> 
                    </Triggers> 
                    <ContentTemplate> 
                        <telerik:RadScheduler Visible="false" runat="server" ID="RadScheduler1" Width="750px" 
                            SelectedView="TimelineView" TimeZoneOffset="00:00:00" DayStartTime="07:00:00" 
                            DayEndTime="19:00:00" DataSourceID="appointmentsPhysiciansObjectDataSource" DataKeyField="appointmentID" 
                            DataSubjectField="appointmentNote" DataStartField="startTime" DataEndField="endTime"
                            <AppointmentTemplate> 
                                <div style="width: 750px;"
                                    <asp:Literal ID="AppointmentSubject" runat="server" Text='<%# Eval("Subject") %>'></asp:Literal> 
                                    (<asp:Literal ID="AppointmentStartTime" runat="server" Text='<%# Eval("start", "{0:t}") %>'></asp:Literal> 
                                    - 
                                    <asp:Literal ID="AppoitmentEndTime" runat="server" Text='<%# Eval("end", "{0:t}") %>'></asp:Literal>
                                </div> 
                            </AppointmentTemplate> 
                        </telerik:RadScheduler> 
                    </ContentTemplate> 
                </asp:UpdatePanel> 
            </ContentTemplate> 
        </cc1:TabPanel> 
    </cc1:TabContainer>  
    <div id="updateProgressDiv" class="updateProgress" style="display: none"
        <div align="center" style="margin-top: 13px;"
            <img alt="Loading" src="images/simple.gif" /> 
            <span class="updateProgressMessage">Loading ...</span> 
        </div> 
    </div> 
    <asp:ObjectDataSource ID="appointmentsPhysiciansObjectDataSource" runat="server" 
        SelectMethod="selectAllAppointments" TypeName="nextEMRDataLayer.appointment" 
        DataObjectTypeName="nextEMRDataLayer.appointment"></asp:ObjectDataSource> 
    <asp:ObjectDataSource ID="patientObjectDataSource" runat="server" SelectMethod="searchPatients" 
        TypeName="nextEMRDataLayer.appointment" DataObjectTypeName="nextEMRDataLayer.appointment"
        <SelectParameters> 
            <asp:Parameter Name="firstname" /> 
            <asp:Parameter Name="lastname" /> 
            <asp:Parameter Name="city" /> 
            <asp:Parameter Name="zip" /> 
        </SelectParameters> 
    </asp:ObjectDataSource> 
    <asp:ObjectDataSource ID="providersObjectDataSource" runat="server" SelectMethod="selectAllPhysicians" 
        TypeName="nextEMRDataLayer.users" DataObjectTypeName="nextEMRDataLayer.users"
    </asp:ObjectDataSource> 
 
    <script language="javascript" type="text/javascript"
        var _updateProgressDiv; 
 
        function pageLoad(sender, args) { 
            //  register for our events 
            Sys.WebForms.PageRequestManager.getInstance().add_beginRequest(beginRequest); 
            Sys.WebForms.PageRequestManager.getInstance().add_endRequest(endRequest); 
 
            _updateProgressDiv = $get('updateProgressDiv'); 
        } 
 
        function beginRequest(sender, args) { 
            //  get the gridview element 
            var tabContainer = $get('<%= Me.tabSchedulerContainer.ClientID %>'); 
 
            // make it visible 
            _updateProgressDiv.style.display = ''
 
            // get the bounds of both the gridview and the progress div 
            var tabContainerwBounds = Sys.UI.DomElement.getBounds(tabContainer); 
            var updateProgressDivBounds = Sys.UI.DomElement.getBounds(_updateProgressDiv); 
 
            //  center of gridview 
            var x = tabContainerwBounds.x + Math.round(tabContainerwBounds.width / 2) - Math.round(updateProgressDivBounds.width / 2); 
            var y = tabContainerwBounds.y + Math.round(tabContainerwBounds.height / 2) - Math.round(updateProgressDivBounds.height / 2); 
 
            //  set the progress element to this position 
            Sys.UI.DomElement.setLocation(_updateProgressDiv, x, y); 
        } 
 
        function endRequest(sender, args) { 
            // make it invisible 
            _updateProgressDiv.style.display = 'none'
        } 
 
        function clientActiveTabChanged(sender, args) { 
            //  trigger the async-postback 
            if (sender.get_activeTabIndex() == 1) { 
                // load tab1 
                __doPostBack('<%=btnTrigger.UniqueID %>', ''); 
            } 
        } 
 
    </script> 
 
</asp:Content> 
<asp:Content ID="Content3" ContentPlaceHolderID="rightColumnContentPlaceHolder" runat="server"
</asp:Content> 
 

3 Answers, 1 is accepted

Sort by
0
Pavlina
Telerik team
answered on 04 Feb 2010, 08:52 AM
Hello Harry,

Unfortunately I was not able to replicate the issue you are facing in the live site.  At this point if the issue persists, you can open a formal support ticket, and send us a small project, demonstrating the case, for further review.

Sincerely yours,
Pavlina
the Telerik team

Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Follow the status of features or bugs in PITS and vote for them to affect their priority.
0
Matthew
Top achievements
Rank 1
answered on 22 Oct 2010, 12:09 AM
Was a resolution for this issue ever found?  I'm having the same problem.  I get the error whenever I try to post back on the page and the RadDateTime control is empty.

Thanks,
Matt
0
Pavlina
Telerik team
answered on 25 Oct 2010, 02:34 PM
Hi Matt,

Can you please send us a simple working project illustrating your scenario and the issue? Thus I can debug it locally and turn back to you with a proper resolution.

Looking forward your reply,

Regards,
Pavlina
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
Calendar
Asked by
Harry Cardillo
Top achievements
Rank 1
Answers by
Pavlina
Telerik team
Matthew
Top achievements
Rank 1
Share this question
or