hi all. here is small app. has a date picker1 and date picker2. clicking button1 sends info to text box2. so total 4 components only. below is picture of my block. need help. on clicking datepicker1, i must able pick the instant now or max 3 days from now. similalry datepicker2 must bick a date max 10 days from now or from datepicker1. if it canot be done like this, pls sugest anyother simple way. on clik button1, it wil give the number of minutes or seconds betwen this 2 dates in textbox2. thank ou in advnce.
once buton is clicked, it must take now(or near future) and target date as permanent. so if i has taken today as now and 10 days as target, there is 240 hours. tomorow if i click buton, it must tell 216 hours. i need a reset button. reset buton must ask for code. plese help.
Use day in place of instant
ty. golumaths100sir. i tried. i gets dates. beautiful but cant i find in terms of minutes. how i can?
also, the othr qestion… on clicking datepicker1, i must able pick the instant now or max 3 days from now. similalry datepicker2 must bick a date max 10 days from now or from datepicker1.
You can use DateUtils extension and check if day picked is more than 3 days from now. If so use a notifier else use date picked See example blocks below
DateUtils can be found here
To get in terms of minutes, multiply the hour with 1440. And use Date Utils tools as @dora_paz stated.