Die Art der abfrage wurde präzisiert bie den Arten der aufträge
This commit is contained in:
@@ -79,7 +79,6 @@
|
||||
</div>
|
||||
|
||||
<div class="d-none d-md-block">
|
||||
|
||||
<div style=" width:780px; margin-left:8px">
|
||||
<fieldset>
|
||||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
|
||||
@@ -110,6 +109,7 @@
|
||||
<asp:Label ID="lbl_von" runat="server" Text="Von:"></asp:Label>
|
||||
<asp:TextBox id="pickdate1" Type="Date" ClientValidationFunction="validate" CssClass="classTarget" OnTextChanged="pickdate1_TextChanged" runat="server"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RequiredFieldValidatorvon" runat="server" ErrorMessage="Field required" ControlToValidate="pickdate1" Text="Required" ForeColor="White" Font-Strikeout="False" Font-Underline="False" Font-Overline="False" Font-Bold="True" BackColor="Red"></asp:RequiredFieldValidator>
|
||||
<asp:CustomValidator ValidateEmptyText="false" ClientValidationFunction=""></asp:CustomValidator>
|
||||
<asp:Label ID="lbl_bis" runat="server" Text="Bis:"></asp:Label>
|
||||
<asp:RequiredFieldValidator ID="RequiredFieldValidatorbis" ClientValidationFunction="validate" runat="server" ErrorMessage="Field required" ControlToValidate="pickdate2" Text="Required" ForeColor="White" Font-Strikeout="False" Font-Underline="False" Font-Overline="False" Font-Bold="True" BackColor="Red"></asp:RequiredFieldValidator>
|
||||
<asp:TextBox id="pickdate2" Type="Date" CssClass="classTarget" OnTextChanged="pickdate2_TextChanged" runat="server"></asp:TextBox>
|
||||
@@ -191,7 +191,6 @@
|
||||
<asp:TableHeaderCell ID="tbl_HeaderCell_Info" runat="server">Info</asp:TableHeaderCell>
|
||||
</asp:TableHeaderRow>
|
||||
</asp:Table>
|
||||
|
||||
</div>
|
||||
</div></div></div>
|
||||
</div>
|
||||
@@ -204,7 +203,6 @@
|
||||
End Try %>
|
||||
<div></div></div> </ContentTemplate></asp:UpdatePanel>
|
||||
|
||||
|
||||
<script src="https://code.jquery.com/jquery-3.5.1.min.js"></script>
|
||||
<script src="http://code.jquery.com/jquery-migrate-1.2.1.min.js"></script>
|
||||
<script>
|
||||
@@ -215,23 +213,19 @@
|
||||
$(e.target).data('bs.collapse').$trigger.attr('src', 'https://s22.postimg.org/9takvqkal/Mathematic_Plus2.png');
|
||||
});
|
||||
</script>
|
||||
<script src="https://cdn.jsdelivr.net/jquery.validation/1.16.0/jquery.validate.min.js"></script>
|
||||
<script src="https://cdn.jsdelivr.net/jquery.validation/1.16.0/additional-methods.min.js"></script>
|
||||
<script>
|
||||
function GetSelectedVal(ele) {
|
||||
|
||||
$("#container2").hide();
|
||||
var el = $(ele).closest('label').text();
|
||||
if (el == "Alle") {
|
||||
$('input:radio[name=art]:checked').change(function () {
|
||||
|
||||
if ($("input[name='art']:checked").val() == "Alle") {
|
||||
$("#container2").show();
|
||||
ValidatorEnable(document.getElementById("RequiredFieldValidatorvon"), true);
|
||||
ValidatorEnable(document.getElementById("RequiredFieldValidatorbis"), true);
|
||||
} else if (el == "Alle_M") {
|
||||
$("#container2").show();
|
||||
ValidatorEnable(document.getElementById("RequiredFieldValidatorvon"), true);
|
||||
ValidatorEnable(document.getElementById("RequiredFieldValidatorbis"), true);
|
||||
} else if (el == "Freigabe") {
|
||||
$("#container2").show();
|
||||
ValidatorEnable(document.getElementById("RequiredFieldValidatorvon"), true);
|
||||
ValidatorEnable(document.getElementById("RequiredFieldValidatorbis"), true);
|
||||
} else if (el == "Freigabe_M") {
|
||||
} else if ($("input[name='art']:checked").val() == "Freigabe") {
|
||||
$("#container2").show();
|
||||
ValidatorEnable(document.getElementById("RequiredFieldValidatorvon"), true);
|
||||
ValidatorEnable(document.getElementById("RequiredFieldValidatorbis"), true);
|
||||
@@ -240,10 +234,26 @@
|
||||
ValidatorEnable(document.getElementById("RequiredFieldValidatorvon"), false);
|
||||
ValidatorEnable(document.getElementById("RequiredFieldValidatorbis"), false);
|
||||
}
|
||||
});
|
||||
$('input:radio[name=art2]:checked').change(function () {
|
||||
|
||||
if ($("input[name='art2']:checked").val() == "Alle_M") {
|
||||
$("#container2").show();
|
||||
ValidatorEnable(document.getElementById("RequiredFieldValidatorvon"), true);
|
||||
ValidatorEnable(document.getElementById("RequiredFieldValidatorbis"), true);
|
||||
} else if ($("input[name='art2']:checked").val() == "Freigabe_M") {
|
||||
$("#container2").show();
|
||||
ValidatorEnable(document.getElementById("RequiredFieldValidatorvon"), true);
|
||||
ValidatorEnable(document.getElementById("RequiredFieldValidatorbis"), true);
|
||||
} else {
|
||||
$("#container2").hide();
|
||||
ValidatorEnable(document.getElementById("RequiredFieldValidatorvon"), false);
|
||||
ValidatorEnable(document.getElementById("RequiredFieldValidatorbis"), false);
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
<script src="https://cdn.jsdelivr.net/jquery.validation/1.16.0/jquery.validate.min.js"></script>
|
||||
<script src="https://cdn.jsdelivr.net/jquery.validation/1.16.0/additional-methods.min.js"></script>
|
||||
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function () {
|
||||
Sys.WebForms.PageRequestManager.getInstance().add_endRequest(EndRequestHandler);
|
||||
@@ -253,5 +263,25 @@
|
||||
}
|
||||
});
|
||||
</script>
|
||||
<script type="text/javascript">
|
||||
var v1 = Date.parse(document.getElementById("pickdate1").text);
|
||||
var v2 = Date.parse(document.getElementById("pickdate2").text);
|
||||
|
||||
If(compareDate(v1)=false) {
|
||||
alert("Datum nicht im gültigen Rahmen!");
|
||||
}
|
||||
</script>
|
||||
<script type="text/javascript">
|
||||
function (compareDate(str1, str2) as Boolean{
|
||||
// str1 format should be dd/mm/yyyy. Separator can be anything e.g. / or -. It wont effect
|
||||
var date1 = new Date(str1);
|
||||
var date2 = new Date(str2);
|
||||
var year0 = new Date('01.01.2001')
|
||||
if (date1.getFullYear() < year0.getFullYear()){
|
||||
return false;
|
||||
} else {
|
||||
return true
|
||||
}
|
||||
});
|
||||
</script>
|
||||
</asp:Content>
|
||||
Reference in New Issue
Block a user