FoxInCloud
Datetime picker
Gravatar is a globally recognized avatar based on your email address. Datetime picker
  Vincent H.
  All
  Nov 26, 2021 @ 08:26am

Hi Thierry,

How can the ROLLOVER be tuned with the new Boostrap control ?

In general, how can we adjust the options?

Thank you

Gravatar is a globally recognized avatar based on your email address. re: Datetime picker
  FoxInCloud Support - Thierry N.
  Vincent H.
  Nov 27, 2021 @ 05:35am

Hi Vincent,

You can set your custom options in your instance of xxxTxt.woDatePickerOptions: at design time, in .Init() or .wcHTMLgen().

rollover is not an available option, the date picker always expects a fully qualified date[-time].

If you adjust SET CENTURY in VFP, FoxInCloud will provide proper dates to the BS date picker.

Gravatar is a globally recognized avatar based on your email address. re: Datetime picker
  Vincent H.
  FoxInCloud Support - Thierry N.
  Nov 28, 2021 @ 01:03am

Thank you.

I would especially like today's date not to be automatically pre-filled by clicking in the field, only by clicking in the calendar.

Otherwise I have SET CENTURY TO 19 ROLLOVER 10 and when I type 01/01/48 I get 01/01/2048 (not 1948)

Gravatar is a globally recognized avatar based on your email address. re: Datetime picker
  FoxInCloud Support - Thierry N.
  Vincent H.
  Nov 29, 2021 @ 10:28am

I would especially like today's date not to be automatically pre-filled by clicking in the field, only by clicking in the calendar.

try these options : date, useCurrent and viewDate

Otherwise I have SET CENTURY TO 19 ROLLOVER 10 and when I type 01/01/48 I get 01/01/2048 (not 1948)

you can try to implement the option parseInputDate (function). Tempus Dominus date picker parses date strings using moment.js; I could not find any option in moment.js similar to rollover.

Gravatar is a globally recognized avatar based on your email address. re: Datetime picker
  FoxInCloud Support - Thierry N.
  Vincent H.
  Nov 30, 2021 @ 11:41pm

Tempus Dominus date picker parses date strings using moment.js; I could not find any option in moment.js similar to rollover.

There is a solution, albeit complex: https://momentjs.com/docs/, see "Parsing two digit years"

Gravatar is a globally recognized avatar based on your email address. re: Datetime picker
  FoxInCloud Support - Thierry N.
  Vincent H.
  Dec 1, 2021 @ 12:56am

You can try to add in xxx.js, or in specific forms' .wcHTMLgen():

moment.parseTwoDigitYear = function(input) {
  input = toInt(input);
  return (input > new Date().getFullYear()-2000+10 ? 1900 : 2000) + input; // rollover 10 years
}
Gravatar is a globally recognized avatar based on your email address. re: Datetime picker
  Vincent H.
  FoxInCloud Support - Thierry N.
  Dec 1, 2021 @ 01:39am

Bravo Thierry !

I added the code in xxx.js and it seems to work perfectly

© 1996-2024