Go Back   CodingForums.com > :: Client side development > JavaScript programming > JavaScript frameworks

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 01-29-2013, 10:42 AM   PM User | #1
jarv
Banned

 
Join Date: Mar 2007
Posts: 1,523
Thanks: 116
Thanked 0 Times in 0 Posts
jarv can only hope to improve
Question is not a function

Please help,

I am using this MooTools datepicker: http://www.styledisplay.com/mootoolsdatepicker/ but with the latest MooTools version: MooTools 1.4.5

I click on my textbox and select a date but the calendar stays on the screen and I cannot see my submit button.

my FireFox console gave the following error:

TypeError: dp.container.remove is not a function

else if (dp.container) dp.container.remove();


here is the relevant Javascript code:
Code:
/* Remove the calendar from the page */
	remove: function(dp){
		$clear(dp.interval);
		dp.active = false;
		if (window.opera) dp.container.empty();
		else if (dp.container) dp.container.remove();
		dp.calendar = false;
		dp.container = false;
		$$('select.dp_hide').removeClass('dp_hide');
	}
jarv is offline   Reply With Quote
Old 01-29-2013, 04:32 PM   PM User | #2
xelawho
Senior Coder

 
xelawho's Avatar
 
Join Date: Nov 2010
Posts: 2,437
Thanks: 52
Thanked 453 Times in 451 Posts
xelawho will become famous soon enoughxelawho will become famous soon enough
I know nothing about MooTools, but should this have two $$
Code:
$$('select.dp_hide').removeClass('dp_hide');
?
xelawho is offline   Reply With Quote
Old 01-30-2013, 09:07 AM   PM User | #3
jarv
Banned

 
Join Date: Mar 2007
Posts: 1,523
Thanks: 116
Thanked 0 Times in 0 Posts
jarv can only hope to improve
thanks but that didn't work
jarv is offline   Reply With Quote
Old 01-31-2013, 12:54 AM   PM User | #4
Old Pedant
Supreme Master coder!

 
Old Pedant's Avatar
 
Join Date: Feb 2009
Posts: 23,198
Thanks: 59
Thanked 3,996 Times in 3,965 Posts
Old Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to all
I don't use mootools, either. But reading their documentation, I indeed see the method empty( ) noted:
http://mootools.net/docs/core/Elemen...#Element:empty

But I do *NOT* see any method named remove( ).

Perhaps you meant destroy( )?
http://mootools.net/docs/core/Elemen...lement:destroy

In any case, perhaps reading that documentation would help?
__________________
An optimist sees the glass as half full.
A pessimist sees the glass as half empty.
A realist drinks it no matter how much there is.
Old Pedant is offline   Reply With Quote
Reply

Bookmarks

Tags
datepicker, function, mootools

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 01:15 AM.


Advertisement
Log in to turn off these ads.