Basic Date Picker Forums

Welcome to Basic Date Picker Forums Sign in | Join | Help
in Search

Timepicker in 1.3.2

Last post 01-16-2007, 8:33 AM by alex. 2 replies.
Sort Posts: Previous Next
  •  01-15-2007, 4:46 AM 1037

    Timepicker in 1.3.2

    I have recently upgraded to use the latest build 1.3.2 but have found that timepicker linking of datepickers isnt working as it was in 1.2

    I have several pages where a datetime is passed via and encoded url string to another page where it is placed in a datepicker inside a formview.  The date comes through fine but the timepicker is not updated.
    It was working fine previously but i noticed the change when i upgraded to 1.3.

    I have tested this and put together a sample to illustrate

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

            If Not Page.IsPostBack Then
                If Request.QueryString("date") <> "" Then
                    Dim eventdate As DateTime = Server.UrlDecode(Request.QueryString("date"))
                    setDatePickers(eventdate)
                End If
            End If

        End Sub

        Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
            Response.Redirect("test.aspx?date=" + Server.UrlEncode(BasicDatePicker1.SelectedDate))
        End Sub

        Protected Sub Button2_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button2.Click
            Dim eventdate As DateTime = BasicDatePicker1.SelectedDate
            setDatePickers(eventdate)
        End Sub

        Sub setDatePickers(ByVal eventdate As DateTime)

            'set date and timepicker in formview
            Dim datepicker As BasicFrame.WebControls.BasicDatePicker = FormView1.FindControl("bdpEventDate")
            If Not datepicker Is Nothing Then
                datepicker.SelectedDate = eventdate
            End If

            'set date and timepicker not in formview
            BasicDatePicker2.SelectedDate = eventdate

        End Sub

        <form id="form1" runat="server">
            <div>
                <h2>Send</h2>
                <BDP:BasicDatePicker ID="BasicDatePicker1" runat="server" TimePicker="TimePicker1">
                </BDP:BasicDatePicker>
                <BDP:TimePicker ID="TimePicker1" runat="server">
                </BDP:TimePicker>
                <asp:Button ID="Button1" runat="server" Text="Redirect" />
                <asp:Button ID="Button2" runat="server" Text="Postback" />
                <h2>Receive in formview</h2>
                <asp:FormView ID="FormView1" runat="server" DefaultMode="Insert">
                    <EditItemTemplate>
                        <asp:Label ID="lblDate" runat="server" Text="Date" CssClass="label"></asp:Label>
                        <BDP:BasicDatePicker ID="bdpEventDate" runat="server" DateFormat="dd/MM/yyyy" SelectedValue='<%# eval("eventdate")%>' TimePicker="tmpTime">
                            <TextBoxStyle Width="70px" />
                        </BDP:BasicDatePicker>
                        <br />
                        <asp:Label ID="lblTime" runat="server" Text="Time" CssClass="label"></asp:Label>
                        <BDP:TimePicker ID="tmpTime" runat="server" DisplayType="MultipleDropDownList" MinuteIncrement="5">
                        </BDP:TimePicker>
                    </EditItemTemplate>
                </asp:FormView>
                <h2>Receive plain</h2>
                <BDP:BasicDatePicker ID="BasicDatePicker2" runat="server" TimePicker="TimePicker2">
                </BDP:BasicDatePicker>
                <BDP:TimePicker ID="TimePicker2" runat="server">
                </BDP:TimePicker>
            </div>
        </form>

    It has a bdp and a timepicker inside a formview and the same outside, on a redirect the outside datepicker is updated as its timepicker whereas the datepicker inside is updated but the tiempiker is not.  Interestingly i checked it using a normal postback as well and it seems then that the outside timepicker then has a problem and doesnt pick up the selected time either.

    I hope this helps

    Alex
  •  01-16-2007, 8:18 AM 1038 in reply to 1037

    Re: Timepicker in 1.3.2

    Hi alex,

    We reproduced this problem with the TimePicker problem and tracked to a small bug. We fixed the bug and published a service release. You can download the latest release by either following a link from a previous "Welcome Kit" email or http://www.basicdatepicker.com/download/.


    Thanks,
    Geoffrey McGill
    ----------------------------------------
    Coolite Inc.
    Email: support [at] coolite [dot] com
    Phone: +1(888)775-5888
  •  01-16-2007, 8:33 AM 1039 in reply to 1038

    Re: Timepicker in 1.3.2

    Just put that into place and im happy to say its working perfectly again

    Thanks

    Alex
View as RSS news feed in XML
 
Powered by Community Server, by Telligent Systems