@Html.LabelFor(model => model.POVisit, new { @class = "control- label",id="POVisit" })
@Html.DropDownList("POVisitID", "Select")
@Html.LabelFor(model => model.OrderReceived, new { @class = "control-label" })
@Html.RadioButton("OrderReceived", 1) Yes
@Html.RadioButton("OrderReceived", 0) No
My jquery code
$(document).ready(function () {
$("#OrderReceivedYesNo").hide();
});
$(document).ready(function () {
$("#POVisit").on('change', function () {
if (this.value == "Order")
{
$("#OrderReceivedYesNo").show();
}
});
});
The above code is not working. The POVisit Dropdown have 7 values which is directly fetch from Database. Initially i hide the OrderReceived radio buttons. If i select the "Order" value in POVisit DropDown it needs to show the "OrderReceivedYesNo" div. But the above code that show code is not working.
And my DateTimePicker is also not working.
jquery-ui.css">
$(document).ready(function () {
$("#Date").datepicker({
maxDate: "+0D",
changeMonth: true,
changeYear: true,
yearRange: "-100:+0",
dateFormat: "M/dd/yy",
});
})
@Html.LabelFor(model => model.Date , new { @class = "control-label" })
@* @Html.TextBoxFor(model => model.Date, new { @class = "form-control", type = "text", id="Date" })*@
Valid order date required (ex. MM-dd-yyyy)
it shows the "Date" format in view but if i select the date and trying to save the date in Db it doesn't save the date in DB .The date column is null and value is null. please any one give me the suggestion and solution to my problem..
Advance Thanks
7 Replies
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
i used this code Ranjit . it working in reverse mode. one i open the form the orderreceived radio button is visible . if i select Order in POVisit . it hide the radio buttons its totally working in reverse order..
Ranjit PowarPosted Jan 30, 2016, 5:51 AM
Sneha KPosted Jan 30, 2016, 5:26 AM
Sneha KPosted Jan 30, 2016, 4:37 AM
Ranjit PowarPosted Jan 30, 2016, 3:58 AM
Ranjit PowarPosted Jan 30, 2016, 3:57 AM
Sneha KPosted Jan 30, 2016, 3:43 AM
Ranjit PowarPosted Jan 30, 2016, 2:56 AM
$(document).ready(function () {
$("#POVisit").on('change', function () {
if ($(this).val()== "Order")
{
$("#OrderReceivedYesNo").show();
}
});
});
If it helps you select it as correct answer