Page 1 of 1

Error field Date, not return the hour in "Go to day" button

Posted: Fri Aug 10, 2018 12:36 pm
by NLj015
Hello, a question, in the new PM 323 not return the hour in field type date, in the
previous PM321 it's worked, in the PM323 always return 00:00:
Error hora to day.png
Error hora to day.png (50.66 KiB) Viewed 4202 times
Thanks

Re: Error filed Date, not return the hour in "Go to day" button

Posted: Fri Aug 10, 2018 11:14 pm
by amosbatto
In all versions of PM, the hour:minute is set to 00:00 by default in datetime fields.

If you want the current hour:minute to be displayed, add " HH:mm" to the datetime's format property (or something similar to display the hour and minutes). Then, set the initial selection date property to minute:
selectCurrentMinute.png
selectCurrentMinute.png (30.11 KiB) Viewed 4190 times

Re: Error filed Date, not return the hour in "Go to day" button

Posted: Mon Aug 13, 2018 8:47 am
by NLj015
amosbatto wrote: Fri Aug 10, 2018 11:14 pm In all versions of PM, the hour:minute is set to 00:00 by default in datetime fields.

If you want the current hour:minute to be displayed, add " HH:mm" to the datetime's format property (or something similar to display the hour and minutes). Then, set the initial selection date property to minute:

selectCurrentMinute.png
sorry, but you are wrong, PM321 does answer the time with the hour
Error hora to day PM321 with hour.png
Error hora to day PM321 with hour.png (59.72 KiB) Viewed 4172 times
and it has correctly configured its properties
Error hora to day PM321 with hour properties.png
Error hora to day PM321 with hour properties.png (30.53 KiB) Viewed 4172 times
and it´s the process, try in pm321, it works

(23.09 KiB) Downloaded 285 times
Thanks

Re: Error filed Date, not return the hour in "Go to day" button

Posted: Mon Aug 13, 2018 8:39 pm
by amosbatto
In PM 3.2.1 Community installed in Debian 8.4, I am seeing the time set to 00:00. Only when I change the initial date selection property to something other than false does it set the time to the current time. I see the same thing in 3.2.3.

3.2.2 and later have Laravel which sets the base time zone to UTC, so maybe that changes something, I'm not seeing the change in the time of datetime fields.

Re: Error filed Date, not return the hour in "Go to day" button

Posted: Tue Aug 14, 2018 8:50 am
by NLj015
ok, importing the same process i had the following results:
-i have pm321 in windows bitnami and return the hour, the pm323 in the same windows return 00:00.
-i have pm321 in debian (9 strech) and return the hour


I can not think of anything, thanks anyway ;)

Re: Error field Date, not return the hour in "Go to day" button

Posted: Tue Oct 30, 2018 2:12 pm
by NLj015
The temporary solution to my problem of assigning the date with hour and minute default was thanks to javascipt, since the "go to day" button started to return to "00:00" in PM323:
Code: Select all
//Función para setear el campo fecha por defecto en HOY 
var today = new Date();
    var dd = today.getDate();
    var MM = today.getMonth()+1; 
    var yyyy = today.getFullYear();
	var mm = today.getMinutes();
    var HH = today.getHours();
    if(dd<10){
        dd='0'+dd;
    } 
    if(MM<10){
        MM='0'+MM;
    }
              //Mask: DD/MM/YYYY, HH: mm
             //Format  JS: YYYY-MM-DD hh:mm:ss

var todayTwo = yyyy+'-'+MM+'-'+dd+' '+HH+':'+mm+':'+00;
console.log("todayTwo: "+todayTwo);
$("#date_fechaPublicacion").setValue(todayTwo); 

:wink: