Calendar / Date Picker
February 28, 2018 12:00 AM
Back in 2016, Sergey Snegirev assisted my office with a Date Picker. Over the last couple months, I can't get it to work (or show up) when I upload my product to ReviewLink or save as an HTML. It shows up (most of the time) when I use Preview Mode in Lectora. Does anyone have any thoughts or suggestions?
$( "#entry217004id" ).datepicker({
minDate: +1, maxDate: "+6M +10D",
showOn: "button",
buttonImage: "custom/images/calendar-32.png",
buttonImageOnly: true,
buttonText: "Select date",
dateFormat: "yy-mm-dd"
});
undefined
And now, to top things off. I have updated to the latest Lectora and now I get this message . . . [OnShowRunJS] TypeError: $ is not a function
Discussion (13)
Can you share the Lectora file? It seems to require a jQuery plugin or maybe jQuery UI?
Which version do you use? $ should be a function in v17.1 and 17.1.3 only in 17.1.2 it wasn't.
undefined
Also, I need to set a second date that can't be earlier than the first date . . . .
By the way, I turned off seamless play. We can add it back but we will have to change some of the JavaScript. I'd just leave it off, it's wonky.
As of this morning, I am now up to 17.1.3, but that has caused more issues. Now Lectora doesn't like the JS code at all and won't show my page properly.
Attached is the page I'm working on that needs the date pick calendar.
I actually have to run so if you want me to explain some of the things I had to fix email me. I have a gmail account and my email name is obrumba.
undefined
Rebecca, use this one instead. I sent you an email explanation of this one instead of the original. Both work but this one is much closer to your original and easier to explain.
Thanks Darrel for all your help. Good news is that it works when I publish to an HTML file. Bad news is the calendars won't show up when I publish to ReviewLink.
Both, but only when it is uploaded to Review link.
The calendar images don’t show up and there isn’t even a blank space that pulls up the calendar. That would be an easy fix . . . Just put in another calendar picture.
I found the issue. It seems that when I published it, Seamless Play stayed selected.
I was taking out most of the pages of my lesson except the one that needs the calendar. When I uploaded to make sure everything did what it was supposed to, I saw the Seamless Play checked and unchecked it . . . . . and the Calendar was there.
I did attach the file in case you wanted to experiment.
Thank you so much for your assistance.
Rebecca
Okay, I learned something today. I do have access to ReviewLink. To all that do not know this, if you have a lectora license you set up your free ReviewLink account by publishing a course to it. I somehow missed those instructions. Thank you to Lectora Support for so quickly getting back to me.
Rebecca, it's a little too late for today but I will try to see if I can get jQueryUI functionality working tomorrow. Is the test you uploaded the same as you sent me? If it is different, can you please either send it to me via email or post it here so I can see if I can get it to work?
Darrel
It is the same. I have tried a few changes, but I keep coming back to your file.
That sounds like the jQueryUI js and/or css files are not loading. Unfortunately, although I have multiple Lectora licenses, I do not have access to ReviewLink so I cannot test and figure out why it is not working.
Discussions have been disabled for this post