Results 1 to 4 of 4
Thread: datetimepicker
- 02-15-2017, 10:01 AM #1
Member
- Join Date
- Feb 2017
- Posts
- 1
- Rep Power
- 0
datetimepicker
Hi all,
I'm starting to learn Java, but I desperately need to adjust a piece of code right now:
I have this code which trims the date from a 'enddate' box.
What I want now is to adjust this code so that it returns 'startdate' 17:00 h
So: startdate = 15-2-2017 08:00
enddate auto fills with: 15-2-2017 17:00
Can anyone make something out of this?
Thanks!
var startDate = $('.pss_fieldname_begindatetime input').val().substring(0,$('.pss_fieldname_begind atetime input').val().indexOf(" ")).trim();
var dateTimeInput = $(this).find("input");
dateTimeInput.on("focus", function() {
setTimeout(function(){
dateTimeInput.datetimepicker({
datepicker:false
});
}, 500);
});
var isDisallowedKeycode = function(keycode){
return (
((keycode >= 48) && (keycode <= 90)) || ((keycode >= 96) && (keycode <= 111)) || ((keycode >= 186) && (keycode <= 22))
);
}
dateTimeInput.on("keydown", function(event){
if (isDisallowedKeycode(event.which)){
return false;
}
});
- 02-15-2017, 10:33 AM #2
Re: datetimepicker
This is a Java forum. Not a JavaScript forum. If you're not sure what language you're learning, I see some trouble down the road for you in the future...
"It's not fixed until you stop calling the problem weird and you understand what was wrong." - gimbal2™ © 2013
- 02-15-2017, 04:14 PM #3
Senior Member
- Join Date
- Sep 2014
- Location
- MA, USA
- Posts
- 399
- Rep Power
- 7
Re: datetimepicker
'love that image.
It is a widely experienced misunderstanding though, you find the Java books usually in the Javascript section and vice versa.
- 02-15-2017, 04:24 PM #4
Bookmarks