Activated the date picker

This commit is contained in:
Erik Thuning 2018-09-06 16:56:34 +02:00
parent 8eadacb9e2
commit 162c89065a
3 changed files with 17 additions and 1 deletions

@ -8,6 +8,8 @@
<link rel="stylesheet" type="text/css" href="./template.css" />
<link rel="stylesheet" type="text/css" href="./style.css" />
<script type="text/javascript" src="./script.js"></script>
<link rel="stylesheet" type="text/css" href="./calendar/dhtmlxcalendar.css" />
<script type="text/javascript" src="./calendar/dhtmlxcalendar.js"></script>
<title>¤title¤</title>
</head>
<body>

@ -344,7 +344,9 @@
<input type="hidden"
name="product"
value="¤id¤" />
<input class="narrow"
<input onClick="JavaScript:calendar(event)"
id="¤id¤_date"
class="narrow"
type="text"
name="end"
value="¤end_new¤" />
@ -402,6 +404,8 @@
<br/>
<span class="label">Slutdatum:</span>
<input type="text"
id="end"
onClick="JavaScript:calendar(event)"
name="end"
value="¤end¤" />
</form>

@ -330,3 +330,13 @@ function updateUser(event) {
var form = event.currentTarget
ajaxRequest('updateuser', dataListFromForm(form), reloadOrError)
}
function calendar(event) {
var input = event.currentTarget
if(!input.cal) {
var cal = new dhtmlXCalendarObject(input.id)
cal.hideTime()
input.cal = cal
cal.show()
}
}