Menu icon Foundation

My Posts




My Comments

Ash Williams commented on Ash Williams's post about 2 years

Right, for anyone else that has an issue with this, figured it out after a few lost dev days....
I put foundation-datepicker.min.js into js/lib, then because it's an ES5 Module, use the require method to initialize the module:
require('./lib/foundation-datepicker.min.js');
The default app.js has on line 4:
window.$ = $;

This was the cause of frustration and meant that jQuery was not being loaded correctly. Once changed to:
window.jQuery = $;

require the Foundation Datepicker module after this line and everything worked fine....at last! 
Probably not the best way of doing it but it works and I can finish the project. Hope it helps someone

Ash Williams commented on Ash Williams's post about 2 years

Unfortunately, that didn't answer my question. Even when it loads correctly, it is saying that the fdatepicker is not a function. Really frustrated here guys, I want to get this project out the door and I can't because of this one supposedly simple js plugin. 
I'm going to have look at other options after this project. :(
There is an issue with the jQuery in the project somewhere but I can't figure it out. Very close to giving up
 
 

Ash Williams commented on Ash Williams's post over 2 years

Any ideas Rafi? Thanks

Ash Williams commented on Ash Williams's post over 2 years

To be more specific, I've wrapped in an open reveal function:
//INITIALIZE FOUNDATION DATEPICKER
$('.reveal').on('open.zf.reveal', function () {
$('.fdatepicker').fdatepicker({
format: 'dd-mm-yyyy',
startView: 4,
startDate: '01-01-1940',
leftArrow: '<i class="fa fa-caret-left" aria-hidden="true"></i>',
rightArrow: '<i class="fa fa-caret-right" aria-hidden="true"></i>'
});
});

Ash Williams commented on Ash Williams's post over 2 years

As per the docs for foundation datepicker 
$('.fdatepicker').fdatepicker({
format: 'dd-mm-yyyy',
startView: 4,
startDate: '01-01-1940',
leftArrow: '<i class="fa fa-caret-left" aria-hidden="true"></i>',
rightArrow: '<i class="fa fa-caret-right" aria-hidden="true"></i>'
});
});
I've used this exact same code in 6.3 and it was working fine.
Thanks Rafi

Ash Williams commented on Alex K's post over 2 years

I have the same errors after trying to update to 6.4.*......any ideas?? Thanks!

Ash Williams commented on Ash Williams's post over 2 years

any ideas Rafi?

Ash Williams commented on Ash Williams's post over 2 years

 Thanks for the reply Rafi, I should have included it in the OP, you can check the code out @ http://staging.99hippos.com/

Posts Followed

  • 5
    Replies
  • Upgrade to 6.4

    By Alex K

    upgradeUpdate

    Hello, I need some help on how to upgrade from 6.3 to 6.4. I ran "foundation update", got message "Nothing to update. You're good!", but when checking bower_components/foundation-sites/ bower.json I still see version 6.3.1 Thank you. 

    Last Reply by Joel Majors over 2 years ago


Following

Followers

My Posts

My Comments

You commented on Ash Williams's post about 2 years

Right, for anyone else that has an issue with this, figured it out after a few lost dev days....
I put foundation-datepicker.min.js into js/lib, then because it's an ES5 Module, use the require method to initialize the module:
require('./lib/foundation-datepicker.min.js');
The default app.js has on line 4:
window.$ = $;

This was the cause of frustration and meant that jQuery was not being loaded correctly. Once changed to:
window.jQuery = $;

require the Foundation Datepicker module after this line and everything worked fine....at last! 
Probably not the best way of doing it but it works and I can finish the project. Hope it helps someone

You commented on Ash Williams's post about 2 years

Unfortunately, that didn't answer my question. Even when it loads correctly, it is saying that the fdatepicker is not a function. Really frustrated here guys, I want to get this project out the door and I can't because of this one supposedly simple js plugin. 
I'm going to have look at other options after this project. :(
There is an issue with the jQuery in the project somewhere but I can't figure it out. Very close to giving up
 
 

You commented on Ash Williams's post over 2 years

Any ideas Rafi? Thanks

You commented on Ash Williams's post over 2 years

To be more specific, I've wrapped in an open reveal function:
//INITIALIZE FOUNDATION DATEPICKER
$('.reveal').on('open.zf.reveal', function () {
$('.fdatepicker').fdatepicker({
format: 'dd-mm-yyyy',
startView: 4,
startDate: '01-01-1940',
leftArrow: '<i class="fa fa-caret-left" aria-hidden="true"></i>',
rightArrow: '<i class="fa fa-caret-right" aria-hidden="true"></i>'
});
});

You commented on Ash Williams's post over 2 years

As per the docs for foundation datepicker 
$('.fdatepicker').fdatepicker({
format: 'dd-mm-yyyy',
startView: 4,
startDate: '01-01-1940',
leftArrow: '<i class="fa fa-caret-left" aria-hidden="true"></i>',
rightArrow: '<i class="fa fa-caret-right" aria-hidden="true"></i>'
});
});
I've used this exact same code in 6.3 and it was working fine.
Thanks Rafi

You commented on Alex K's post over 2 years

I have the same errors after trying to update to 6.4.*......any ideas?? Thanks!

You commented on Ash Williams's post over 2 years

any ideas Rafi?

You commented on Ash Williams's post over 2 years

 Thanks for the reply Rafi, I should have included it in the OP, you can check the code out @ http://staging.99hippos.com/

Posts Followed


Following

Followers

  • No Content