Skip to content
Snippets Groups Projects
Commit 773fc517 authored by Bhabesh Bhabani Mukhopadhyay's avatar Bhabesh Bhabani Mukhopadhyay
Browse files

Max and min Date for Observation date (suggested by : Berit)

parent 3b7ce0b3
No related branches found
No related tags found
No related merge requests found
,wildfly,bhabesh-HP-NIBIO-Ubuntu.hitronhub.home,02.08.2021 13:26,file:///home/wildfly/.config/libreoffice/4; ,wildfly,bhabesh-HP-NIBIO-Ubuntu.hitronhub.home,02.08.2021 18:01,file:///home/wildfly/.config/libreoffice/4;
\ No newline at end of file \ No newline at end of file
No preview for this file type
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
</div> </div>
<!-- <input type="datetime-local" v-bind='strDateObservation | dateFormat' v-model="strDateObservation"/> --> <!-- <input type="datetime-local" v-bind='strDateObservation | dateFormat' v-model="strDateObservation"/> -->
<div class="row"> <div class="row">
<input ref="strDateObservation" type="datetime-local" v-model="strDateObservation" v-on:change="capturedTime($event)"/> <input id="strDateObservation" ref="strDateObservation" type="datetime-local" :max="maxObservationDate" :min="minObservationDate" v-model="strDateObservation" v-on:change="capturedTime($event)"/>
</div> </div>
</div> </div>
...@@ -160,6 +160,8 @@ export default { ...@@ -160,6 +160,8 @@ export default {
isActive : false, isActive : false,
dateObservation : DateTime, dateObservation : DateTime,
strDateObservation : null, strDateObservation : null,
maxObservationDate : null,
minObservationDate : null,
observationHeader : '', observationHeader : '',
observationText : '', observationText : '',
mapGeoinfo : null, mapGeoinfo : null,
...@@ -481,7 +483,6 @@ export default { ...@@ -481,7 +483,6 @@ export default {
capturedTime(event) capturedTime(event)
{ {
this.observation.timeOfObservation=this.strDateObservation; this.observation.timeOfObservation=this.strDateObservation;
}, },
/** Get New Observation */ /** Get New Observation */
...@@ -796,6 +797,29 @@ export default { ...@@ -796,6 +797,29 @@ export default {
var navDiv = document.getElementById("vipsobsappmenu"); var navDiv = document.getElementById("vipsobsappmenu");
btnBack.style.top=(navDiv.offsetHeight) + "px"; btnBack.style.top=(navDiv.offsetHeight) + "px";
btnBack.style.left=0+"px"; btnBack.style.left=0+"px";
//minObservationDate
var dtToday = new Date();
var month = dtToday.getMonth() + 1;
var day = dtToday.getDate();
var year = dtToday.getFullYear();
if(month < 10)
month = '0' + month.toString();
if(day < 10)
day = '0' + day.toString();
var maxDate = year + '-' + month + '-' + day;
var minDate = year + '-' + '01' + '-' + '01';
this.maxObservationDate = maxDate+'T00:00';
this.minObservationDate = minDate+'T00:00';
if(this.paramObservation) if(this.paramObservation)
{ {
this.observation = this.paramObservation; this.observation = this.paramObservation;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment