Click here to Skip to main content
15,886,199 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
Please find my aspx page ... I have made datepicker display none on page load . I am trying to make it show .... How to do it ????

HTML
<tr>
        <td>     
           <%= Html.Telerik().DropDownList()
                .Name("Action")
               .DataBinding(binding => binding.Ajax().Select("getAction", "Rule"))
                .ClientEvents(events => events
                .OnChange("CheckValueForInvestigator"))
                
               
        %>
        </td>
        <td><%=Html.Telerik().DropDownList().Name("ExecutionTypo").DataBinding(exebind=>exebind.Ajax().Select("getExecutionPattern","Rule")).ClientEvents(events=>events.OnChange("CheckValueForInvestigator"))%></td>
        <td style=""><%=Html.Telerik().DatePicker().Name("effdate").Format("dd/MM/yyyy").OpenOnFocus(true).Min(DateTime.Now).Value(DateTime.Now).HtmlAttributes(new { onkeypress = "return false", onpaste = "return false", Style = "width:167px;display: none " })%></td>
        <td style=""><%=Html.Telerik().DatePicker().Name("effTodate").Format("dd/MM/yyyy").OpenOnFocus(true).Min(DateTime.Now).HtmlAttributes(new { onkeypress = "return false", onpaste = "return false", Style = "width:167px;display: none " })%></td>

        </tr>



and my jqery function

JavaScript
function CheckValueForInvestigator() {
    debugger;
    $("#investigatorName").hide();
    $("#InformationReq").hide();
    $("#ApproverRemarks").hide();
    $("#lbleffdate").hide();
    $("#effdate").hide();
    $("#lbleffTodate").hide();
    $("#effTodate").hide();

    var value = $("#Action").val();
    var exevalue = $("#ExecutionTypo").val();
    if (value == "PI") {
        $("#investigatorName").show();

    }
    if (value == "IR") {
        $("#InformationReq").show();
    }
    if (value == "AF") {
        $("#ApproverRemarks").show();
    }
    if (exevalue == "SpecificCases") {
        $("#lbleffdate").show();
        $get("effdate").style.display = "show";
        $("#lbleffTodate").show();
        $get("effTodate").style.display = "show";
     }

}
Posted
Comments
pkarthionline 25-Feb-14 2:37am    
have you got answer?. I am also have same query.

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