Completed
Last Updated: 23 May 2025 08:21 by ADMIN
Release 2025 Q2 (May)
Patrice Boissonneault
Created on: 02 May 2025 15:21
Category: DateInput
Type: Bug Report
1
Invalid regular expression

Getting javascript error:

 

Uncaught SyntaxError: Invalid regular expression: /[A-Za-zªµºÀ-ÖØ-öø-ȟȢ-ȳɐ-ʭʰ-ʸʻ-ˁːˑˠ-ˤˮͺΆΈ-ΊΌΎ-ΡΣ-ώϐ-ϗϚ-ϳЀ-ҁҌ-ӄӇӈӋӌӐ-ӵӸӹԱ-Ֆՙա-ևא-תװ-ײء-غـ-يٱ-ۓەۥۦۺ-ۼܐܒ-ܬހ-ޥअ-हऽॐक़-ॡঅ-ঌএঐও-নপ-রলশ-হড়ঢ়য়-ৡৰৱਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴંઅ-ઋઍએ-ઑઓ-નપ-રલળવ-હઽ-ૂેો્ૐૠଅ-ଌଏଐଓ-ନପ-ରଲଳଶ-ହଽଡ଼ଢ଼ୟ-ୡஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-வஷ-ஹఅ-ఌఎ-ఐఒ-నప-ళవ-హౠౡಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹೞೠೡഅ-ഌഎ-ഐഒ-നപ-ഹൠൡඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ະາຳຽເ-ໄໆໜໝༀཀ-ཇཉ-ཪྈ-ྋက-အဣ-ဧဩဪၐ-ၕႠ-Ⴥა-ჶᄀ-ᅙᅟ-ᆢᆨ-ᇹሀ-ሆለ-ቆቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኆኈኊ-ኍነ-ኮኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዎዐ-ዖዘ-ዮደ-ጎጐጒ-ጕጘ-ጞጠ-ፆፈ-ፚᎠ-Ᏼᐁ-ᙬᙯ-ᙶᚁ-ᚚᚠ-ᛪក-ឳᠠ-ᡷᢀ-ᢨḀ-ẛẠ-ỹἀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁿℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℱℳ-ℹ々〆〱-〵ぁ-ゔゝゞァ-ヺー-ヾㄅ-ㄬㄱ-ㆎㆠ-ㆷ㐀-䶵一-龥ꀀ-ꒌ가-힣豈-鶴ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹲﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ][̀-͎͠-҃͢-҆҈҉֑-֣֡-ֹֻ-ֽֿׁׂًׄ-ٰٕۖ-۪ۤۧۨ-ܑۭܰ-݊ަ-ްँ-ः़ा-्॑-॔ॢॣঁ-ঃ়া-ৄেৈো-্ৗৢৣਂ਼ਾ-ੂੇੈੋ-੍ੰੱઁ-ઃ઼ા-ૅે-ૉો-્ଁ-ଃ଼ା-ୃେୈୋ-୍ୖୗஂஃா-ூெ-ைொ-்ௗఁ-ఃా-ౄె-ైొ-్ౕౖಂಃಾ-ೄೆ-ೈೊ-್ೕೖംഃാ-ൃെ-ൈൊ-്ൗංඃ්ා-ුූෘ-ෟෲෳัิ-ฺ็-๎ັິ-ູົຼ່-ໍ༹༘༙༵༷༾༿ཱ-྄྆྇ྐ-ྗྙ-ྼ࿆ာ-ဲံ-္ၖ-ၙ឴-៓ᢩ⃐-⃣〪-゙゚ﬞ〯︠-︣]?/: Range out of order in character class (at ) at new RegExp (<anonymous>) at at
(anonymous)@
(anonymous)@

 

10 comments
ADMIN
Rumen
Posted on: 23 May 2025 08:21

You are welcome, Jeffrey! Let me know if you have any other questions! I will be glad to assist you.

 

Regards,
Rumen
Progress Telerik

Stay tuned by visiting our public roadmap and feedback portal pages! Or perhaps, if you are new to our Telerik family, check out our getting started resources
Jeffrey
Posted on: 22 May 2025 18:18
Thanks! I will follow this other bug thread from now on.
ADMIN
Rumen
Posted on: 22 May 2025 09:51

Hi Jeff,

I'm following up to confirm that we've successfully reproduced the Uncaught TypeError: Cannot read properties of null (reading 'className') issue and have provided a workaround for it.

Regards,
Rumen
Progress Telerik

Stay tuned by visiting our public roadmap and feedback portal pages! Or perhaps, if you are new to our Telerik family, check out our getting started resources
ADMIN
Rumen
Posted on: 22 May 2025 05:07

Hi Jeff,

Thank you for the follow-up!

I attempted to replicate the new error but was unable to reproduce it. Could you please confirm whether the issue occurs in the live demos that run the latest version?

https://demos.telerik.com/aspnet-ajax/dateinput/overview/defaultcs.aspx

To help us investigate further, could you please provide the following details:

  • Disable AJAX: Set EnableAJAX="false" in the RadAjaxManager or RadAjaxPanel, then check the browser console for any JavaScript errors. This will help us get more descriptive error messages, as explained: Get more descriptive errors by disabling AJAX.
  • Enable the CDN: This can help identify the specific file where the issue is occurring:

    <telerik:RadScriptManager 
    	ID="RadScriptManager1"    
    	runat="server"    
    	CdnSettings-TelerikCdn="Enabled">
    </telerik:RadScriptManager>
  • Isolated Sample: If possible, isolate the issue in a simple, runnable project and share it with us for further examination.
Looking forward to your response.

Regards,
Rumen
Progress Telerik

Stay tuned by visiting our public roadmap and feedback portal pages! Or perhaps, if you are new to our Telerik family, check out our getting started resources
Jeffrey
Posted on: 21 May 2025 22:05

I updated to 2025.2.520.462 and the regular expression problem disappeared, but it now throws this error in the console. Seems to still have a problem related to the RadDateInput control.

VM222 Telerik.Web.UI.WebResource.axd:53  Uncaught TypeError: Cannot read properties of null (reading 'className')
    at Telerik.Web.UI.RadDateInput.updateCssClass (VM222 Telerik.Web.UI.WebResource.axd:53:12134)
    at Telerik.Web.UI.RadDateInput.set_enabled (VM222 Telerik.Web.UI.WebResource.axd:53:17965)
    at Sys$Component$_setProperties (VM222 Telerik.Web.UI.WebResource.axd:6:54456)
    at Sys.Component.create (VM222 Telerik.Web.UI.WebResource.axd:6:54944)
    at Array.<anonymous> (ModifyJob.aspx?JobID=94846&v_JobListDir=Asc&v_JobListPageSize=15&s_Address=1200&s_Builder=0&s_Office=0:582:5)
    at VM222 Telerik.Web.UI.WebResource.axd:6:51370
    at Sys._Application._raiseInit (VM222 Telerik.Web.UI.WebResource.axd:6:72276)
    at Sys._Application.initialize (VM222 Telerik.Web.UI.WebResource.axd:6:69772)
    at b (VM222 Telerik.Web.UI.WebResource.axd:6:71512)
    at HTMLDocument.a (VM222 Telerik.Web.UI.WebResource.axd:6:71786)

Any thoughts on how to get around this?

Jeff Taylor

ADMIN
Rumen
Posted on: 16 May 2025 07:11

Hi Jeff,

Thank you for reaching out.

The 2025 Q2 release of Telerik UI for ASP.NET AJAX is scheduled for Wednesday, May 21, and it will include the fix for the Date Picker issue introduced in version 2025.1.416.

In the meantime, to avoid the vulnerability in earlier versions, we recommend applying one of the mitigation options 2 or 3 outlined in our official Knowledge Base article:

These options provide a level of protection and will secure your application until the Q2 update is available.

Regards,
Rumen
Progress Telerik

Stay tuned by visiting our public roadmap and feedback portal pages! Or perhaps, if you are new to our Telerik family, check out our getting started resources
Jeffrey
Posted on: 15 May 2025 21:08

We have this problem too after updating to 416 avoid the vulnerability in previous versions.

We tried your workaround using the CDN and it did not seem to work for us. When will the actual fix for Q2 be released so we can have both working Date Pickers and the hotfix for the vulnerability?

Jeff Taylor

ADMIN
Rumen
Posted on: 06 May 2025 09:54

Hi Patrice,

Thank you for reporting this issue.


We have verified the problem and made your bug report public so others can stay informed about its status.

We identified that the RadDateInputScript.js file has been incorrectly encoded since version 2025.1.218, as a side effect of recent updates to our build infrastructure. We are actively investigating a fix.

In the meantime, could you please try configuring the control to load its embedded scripts or use scripts from a CDN as a workaround? An alternative approach is to obtain RadDateInputScript.js  from the 2024_4_1114 installation -> Telerik_UI_for_ASP.NET_AJAX_2024_4_1114_Dev_hotfix.zip\Scripts\Input\DateInput and to replace the broken file.

 

As a small note of gratitude for reporting the issue, I have updated your Telerik points.

Regards,
Rumen
Progress Telerik

Stay tuned by visiting our public roadmap and feedback portal pages! Or perhaps, if you are new to our Telerik family, check out our getting started resources
Patrice Boissonneault
Posted on: 05 May 2025 12:10

Hi Vasko,

Thanks for the reply, but the regular expression is in Telerik's code, not mine. Have you checked RadDateInputScript.js?

That's where it lies.

I'm getting this error since I updated to latest version of Telerik. No code change from my end.

Please advise.

Patrice

 

ADMIN
Vasko
Posted on: 05 May 2025 10:42

Hi Patrice ,

The error you're encountering, Invalid regular expression: Range out of order in character class, indicates that there is a problem with the syntax of the regular expression used in your JavaScript code. This typically occurs when character ranges within the regular expression are not correctly ordered or overlap incorrectly.

To resolve this issue, here are a few steps you can take:

  1. Review the Regular Expression: Examine the character class within the regular expression to ensure that all ranges are correctly ordered. For example, ensure that the start and end characters of each range are properly defined and in the correct order.

  2. Simplify the Expression: If the regular expression is complex or includes many ranges, try breaking it down into simpler parts or removing unnecessary ranges. This can help isolate the problematic part of the expression.

  3. Use Character Classes Carefully: Ensure that any special characters or Unicode ranges are correctly specified and do not overlap. If you're using Unicode ranges, ensure they are valid and correctly formatted.

  4. Validate the Regular Expression: Utilize tools like regex testers available online to validate and test your regular expression independently. This can help identify syntax issues or misconfigurations.

    If these suggestions do not help you out, please share additional details, such as the code used for the DateInput and steps to reproduce the error.

      Regards,
      Vasko
      Progress Telerik

      Stay tuned by visiting our public roadmap and feedback portal pages! Or perhaps, if you are new to our Telerik family, check out our getting started resources