[SOLVED] Date field not working

In the release of today 25-11-2026 the date field is not usable. This is a very important field type. Whatever format I choose the field always displays a xx/xx/xx/xx format instead of xx/xx/xxxx or xxxx/xx/xx. Than a message “Date Of Birth: Invalid data”. Please fix this bug immediatly. I have got deadlines to meet.

Roelof Pit

Previously, when entering a date, the cursor would automatically move from the day field to the month field, and then to the year field.
Now, I can keep typing numbers into the day field without it automatically advancing to the next field.
Please fix this quickly; all our clients are complaining.

image

@NicoAlpha @roelof

We have identified the reported issue and forwarded it to the responsible team with a priority for immediate resolution.

As soon as the fix is ​​released, we will provide an update in this thread.

Best regards!

Hi everyone,

We are sending you a file that contains the fix for the issue mentioned above, so that you may replace the existing file in your environment.

The filename is “jquery.scInput2.js,” and it is located at the following path: your-scriptcase/devel/lib/js/

Before replacing the current file in your environment with the one we have provided, we recommend deleting the file named “_sc_cache_jquery.scInput2_10.X.XXX.” This ensures that the application does not reference the old file and allows it to generate a new cache file that includes the fix.

Best regards!

Hi @Danilo_Lima,

Thanks for the file, but unfortunately it does not fix the issue. I replaced it (and deleted the cache file), and the date fields still accept unlimited digits and never move to the next field.

I compared the new jquery.scInput2.js with the previous one: the changes only add support, date separator parsing and textarea caret scrolling. Nothing related to this bug was changed.

Root cause
ScriptCase generates the split date fields like this:

<input id="SC_arrivo_dia" alt="{datatype: 'mask', maskList: '99', alignRight: true, maxLength: 2, autoTab: true, enterTab: false}">

But normalizeConfig() in jquery.scInput2.js only reads mask and alignment:

c.mask = optStr(raw.mask, '');

Since mask is empty, createEngine() returns null and the plugin ignores the field completely: no 2-digit limit, no autoTab, no right alignment. This affects every field with a mask generated with maskList, not just dates.

Fix (tested, works on our installation)
In normalizeConfig():

// case 'mask':
c.mask = optStr(has(raw.mask) && raw.mask !== '' ? raw.mask : raw.maskList, '');

and after the line that sets c.alignment:

if (!c.alignment && optBool(raw.alignRight, false)) c.alignment = 'right';

Also note that published applications load the file from <app>/_lib/lib/js/jquery.scInput2.js, so replacing it only in devel/lib/js/ is not enough until the app is republished.

Please include this in the official release so it does not get lost with the next update.

Best regards,
Nicola

@NicoAlpha,

We have implemented some additional fixes that also address other issues related to input masks, as well as fields of the “Date and Time” type. The file remains the same, and the procedure for using it is also unchanged.

I have also included a short video below demonstrating that the issue has been resolved.

Regarding this fix, rest assured that it will be officially included in the next version.

Best regards!

Hi @Danilo_Lima,

Thanks, I tested the new jquery.scInput2.js and I can confirm that the date fields now work again: with maskList being read, the split day/month/year fields are limited to 2/2/4 digits and the cursor moves automatically to the next field. The datetime fix with seconds (dd/mm/yyyy;hh:ii:ss) also works.

There are two small things I noticed while comparing it with the previous version:

1. alignRight is still ignored
ScriptCase generates the fields with alignRight: true:

<input id="SC_arrivo_dia" alt="{datatype: 'mask', maskList: '99', alignRight: true, maxLength: 2, autoTab: true, enterTab: false}">

but normalizeConfig() only reads alignment, so these fields are left-aligned. Suggested fix, right after the line that sets c.alignment:

if (!c.alignment && optBool(raw.alignRight, false)) c.alignment = 'right';

2. mm for minutes no longer works in time formats
In buildDateTimeMask() the { m: 'i' } alias was removed. With timeFormat: 'hh:ii' everything is fine, but with timeFormat: 'hh:mm' the field now only accepts the hours (typing 1234 gives 12 instead of 12:34). If ScriptCase always generates ii this doesn’t matter, but it may be worth keeping the alias for safety, since it was working in the previous version.

Best regards,
Nicola

Hi @Danilo_Lima,

One more difference compared to the previous version, this time about the date fields (day / month / year):

Before: clicking or tabbing into a date field selected its whole content, so typing replaced the old value.
Now: the content is not selected, the cursor is just placed in the field.

The cause is that the fields are generated without selectOnFocus in the alt attribute:

<input id="SC_arrivo_dia" alt="{datatype: 'mask', maskList: '99', alignRight: true, maxLength: 2, autoTab: true, enterTab: false}">

and in normalizeConfig() the default is:

c.selectOnFocus = optBool(raw.selectOnFocus, false);

so nothing is selected on focus.

Suggested fix (tested, it restores the previous behavior on our installation):

// fields with a mask (day/month/year, time) select everything on focus, as before
c.selectOnFocus = optBool(raw.selectOnFocus, dt === 'mask' || dt === 'date' || dt === 'time' || dt === 'datetime');

An explicit selectOnFocus: false in the alt still disables it.

To summarize, these are the differences still present in the current jquery.scInput2.js compared to the previous behavior:

  1. alignRight: true is ignored (fields are left-aligned)
  2. mm is no longer accepted as minutes in time formats (the { m: 'i' } alias was removed)
  3. select on focus no longer happens on masked/date fields (this post)

Thanks,
Nicola