[CLOSED] [2.2+] Uncaught TypeError when Showing Window with DatePicker after DirectEvent set DisabledDatesRE

  1. #1

    [CLOSED] [2.2+] Uncaught TypeError when Showing Window with DatePicker after DirectEvent set DisabledDatesRE

    Uncaught TypeError: Object new RegExp('^(?!^(^6\/9\/2013)|(^7\/14\/2013)|(^8\/11\/2013)|(^9\/8\/2013)|(^10\/13\/2013)|(^11\/10\/2013)|(^12\/8\/2013)|(^1\/12\/2014)|(^2\/9\/2014)|(^3\/9\/2014)|(^4\/13\/2014)|(^5\/11\/2014)|(^6\/8\/2014)|(^7\/13\/2014)|(^8\/10\/2014)|(^9\/14\/2014)|(^10\/12\/2014)|(^11\/9\/2014)|(^12\/14\/2014)|(^1\/11\/2015)|(^2\/8\/2015)|(^3\/8\/2015)|(^4\/12\/2015)|(^5\/10\/2015)|(^6\/14\/2015)|(^7\/12\/2015)|(^8\/9\/2015)|(^9\/13\/2015)|(^10\/11\/2015)|(^11\/8\/2015)|(^12\/13\/2015)|(^1\/10\/2016)|(^2\/14\/2016)|(^3\/13\/2016)|(^4\/10\/2016)|(^5\/8\/2016)|(^6\/12\/2016)|(^7\/10\/2016)|(^8\/14\/2016)|(^9\/11\/2016)|(^10\/9\/2016)|(^11\/13\/2016)|(^12\/11\/2016)|(^1\/8\/2017)|(^2\/12\/2017)|(^3\/12\/2017)|(^4\/9\/2017)|(^5\/14\/2017)|(^6\/11\/2017)|(^7\/9\/2017)|(^8\/13\/2017)|(^9\/10\/2017)|(^10\/8\/2017)|(^11\/12\/2017)|(^12\/10\/2017)|(^1\/14\/2018)|(^2\/11\/2018)|(^3\/11\/2018)|(^4\/8\/2018)|(^5\/13\/2018)|(^6\/10\/2018)$).*$') has no method 'test'

    in Ext.define.fullUpdate

    whenDates.DisabledDatesRE set in DirectEvent followed by DateW.Show();

        <ext:Window ID="DateW" runat="server" CloseAction="Hide" Title="Preview" Hidden="true" Resizable="false">
        <Items>
            <ext:DatePicker ID="Dates" runat="server" />
        </Items>
        </ext:Window>
    Last edited by Daniil; May 30, 2013 at 1:36 PM. Reason: [CLOSED]
  2. #2
    p.s. I searched for DatePicker in the examples explorer and found nothing. Thought I'd note this.
  3. #3
    Hi @michaeld,

    Could you, please, provide a full test case?
  4. #4
    <%@ Page Language="C#" %>
    
    
    <script runat="server">
    	protected void Page_Load( object sender, EventArgs e ) {
    	}
    	protected void OnPreview( object sender, DirectEventArgs e ) {
    		Dates.DisabledDatesRE = @"new RegExp('^(?!^(^6\/2\/2013)|(^4\/26\/2015)$).*$')";
    		DateW.Show();
    	}
    </script>
    
    
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "//www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="//www.w3.org/1999/xhtml">
    <head runat="server">
        <title>Test</title>
    </head>
    <body>
    <form id="f" runat="server">
    
    
    
    
    <ext:Viewport ID="vp" runat="server" Layout="VBoxLayout">
    <LayoutConfig>
        <ext:VBoxLayoutConfig Align="Stretch" />
    </LayoutConfig>
    <Items>
    
    
    	<ext:FormPanel runat="server" Width="400" Border="false">
    	<Bin>
    
    
    		<ext:Window ID="DateW" runat="server" CloseAction="Hide" Title="Preview of Next 100 Dates" Hidden="true" Resizable="false">
    		<Items>
    			<ext:DatePicker ID="Dates" runat="server" />
    		</Items>
    		</ext:Window>
    
    
    	</Bin>
    	<Content>
    		Test...		
    	</Content>
    	<Buttons>
    
    
    		<ext:Button id="Preview" runat="server" Type="Button" Text="Preview Dates">
    		<DirectEvents>
    			<Click OnEvent="OnPreview">
    				<EventMask ShowMask="true" MinDelay="500" Msg="Getting Dates..." />
    			</Click>
    		</DirectEvents>
    		</ext:Button>
    
    
    	</Buttons>
    	</ext:FormPanel>
    
    
    </Items>
    </ext:ViewPort>
    
    
    <ext:ResourceManager ID="rm" runat="server" CleanResourceUrl="true" ScriptMode="Development" InitScriptMode="Linked"
    	 HideInDesign="true" GZip="true" />
    </form>
    </body>
    </html>
  5. #5
    Thank you. Fixed in SVN.

    But please do not use "new RegExp()". Just a raw string of a regular expression.

Similar Threads

  1. Replies: 5
    Last Post: Nov 26, 2012, 2:33 PM
  2. Replies: 8
    Last Post: Nov 26, 2012, 11:19 AM
  3. [CLOSED] Uncaught TypeError: Object #<Object> has no method '***'
    By Sevilay Tanış in forum 1.x Legacy Premium Help
    Replies: 7
    Last Post: Mar 27, 2012, 4:44 PM
  4. [CLOSED] Hiding/Showing tabs in TabPanel during DirectEvent
    By jmcantrell in forum 1.x Legacy Premium Help
    Replies: 13
    Last Post: Jul 16, 2010, 3:30 PM
  5. Replies: 2
    Last Post: Jun 22, 2010, 3:03 PM

Tags for this Thread

Posting Permissions