diff --git a/Customers/CustomsAviso.aspx b/Customers/CustomsAviso.aspx index da21533..2825d81 100644 --- a/Customers/CustomsAviso.aspx +++ b/Customers/CustomsAviso.aspx @@ -107,11 +107,11 @@
- - - + + - +
@@ -221,34 +221,20 @@ var el = $(ele).closest('label').text(); if (el == "Alle") { $("#container2").show(); - $("#pickdate1").text = "01." + Date.now.MM.toString + "." +Date.now.yyyy.toString + " " + Date.now.hh.toString + ":" + Date.now.MM.toString + ":" + Date.now.yyyy.toString; - $("#pickdate2").text = Date.now.dd.toString + "." + Date.now.MM.toString + "." Date.now.yyyy.toString + " " + Date.now.hh.toString + ":" + Date.now.MM.toString + ":" + Date.now.yyyy.toString; - ValidatorEnable(document.getElementById('<%=RequiredFieldValidatorvon.ClientID %>'), true); - ValidatorEnable(document.getElementById('<%=RequiredFieldValidatorbis.ClientID %>'), true); + var date1 = document.getElementById('<%=pickdate1.ClientID%>') + var date2 = document.getElementById('<%=pickdate2.ClientID%>') + date1.attributes.required = true + date2.attributes.required = true + dat } else if (el == "Alle_M") { $("#container2").show(); - $("#pickdate1").text = "01." + Date.now.MM.toString + "." + Date.now.yyyy.toString + " " + Date.now.hh.toString + ":" + Date.now.MM.toString + ":" + Date.now.yyyy.toString; - $("#pickdate2").text = Date.now.dd.toString + "." + Date.now.MM.toString + "." Date.now.yyyy.toString + " " + Date.now.hh.toString + ":" + Date.now.MM.toString + ":" + Date.now.yyyy.toString; - ValidatorEnable(document.getElementById('<%=RequiredFieldValidatorvon.ClientID %>'), true); - ValidatorEnable(document.getElementById('<%=RequiredFieldValidatorbis.ClientID %>'), true); - } else if (el == "Freigabe") { - $("#container2").show(); - $("#pickdate1").text = "01." + Date.now.MM.toString + "." + Date.now.yyyy.toString + " " + Date.now.hh.toString + ":" + Date.now.MM.toString + ":" + Date.now.yyyy.toString; - $("#pickdate2").text = Date.now.dd.toString + "." + Date.now.MM.toString + "." Date.now.yyyy.toString + " " + Date.now.hh.toString + ":" + Date.now.MM.toString + ":" + Date.now.yyyy.toString; - ValidatorEnable(document.getElementById('<%=RequiredFieldValidatorvon.ClientID %>'), true); - ValidatorEnable(document.getElementById('<%=RequiredFieldValidatorbis.ClientID %>'), true); - } else if (el == "Freigabe_M") { - $("#container2").show(); - $("#pickdate1").text = "01." + Date.now.MM.toString + "." + Date.now.yyyy.toString + " " + Date.now.hh.toString + ":" + Date.now.MM.toString + ":" + Date.now.yyyy.toString; - $("#pickdate2").text = Date.now.dd.toString + "." + Date.now.MM.toString + "." Date.now.yyyy.toString + " " + Date.now.hh.toString + ":" + Date.now.MM.toString + ":" + Date.now.yyyy.toString; - ValidatorEnable(document.getElementById('<%=RequiredFieldValidatorvon.ClientID %>'), true); - ValidatorEnable(document.getElementById('<%=RequiredFieldValidatorbis.ClientID %>'), true); + date1.attributes.required = true + date2.attributes.required = true + } else { $("#container2").hide(); - $("#pickdate1").text = "01." + Date.now.MM.toString + "." + Date.now.yyyy.toString + " " + Date.now.hh.toString + ":" + Date.now.MM.toString + ":" + Date.now.yyyy.toString; - $("#pickdate2").text = Date.now.dd.toString + "." + Date.now.MM.toString + "." Date.now.yyyy.toString + " " + Date.now.hh.toString + ":" + Date.now.MM.toString + ":" + Date.now.yyyy.toString; - ValidatorEnable(document.getElementById('<%=RequiredFieldValidatorvon.ClientID %>'), false); - ValidatorEnable(document.getElementById('<%=RequiredFieldValidatorbis.ClientID %>'), false); + date1.attributes.required = false + date2.attributes.required = false } } @@ -261,13 +247,7 @@ } }); - - + \ No newline at end of file diff --git a/Customers/CustomsAviso.aspx.vb b/Customers/CustomsAviso.aspx.vb index 9f17987..0376201 100644 --- a/Customers/CustomsAviso.aspx.vb +++ b/Customers/CustomsAviso.aspx.vb @@ -427,16 +427,16 @@ Partial Class Kundenbereich_Default End Sub Protected Sub pickdate1_TextChanged(sender As Object, e As EventArgs) - Dim TB As TextBox = sender + Dim TB As TextBox = pickdate1 If TB.Text = "" Then - TB.Attributes.Add("Border", "2px solid red") + pickdate1.BorderColor = Drawing.Color.Red Else - TB.Attributes.Add("Border", "None") + pickdate1.BorderStyle = 1 End If End Sub Protected Sub pickdate2_TextChanged(sender As Object, e As EventArgs) - Dim TB As TextBox = sender + Dim TB As TextBox = pickdate2 If TB.Text = "" Then TB.Attributes.Add("Border", "2px solid red") Else diff --git a/newpageJulius_Sidebar.aspx b/newpageJulius_Sidebar.aspx index 0c06676..6aa86be 100644 --- a/newpageJulius_Sidebar.aspx +++ b/newpageJulius_Sidebar.aspx @@ -619,7 +619,7 @@ } \ No newline at end of file