hominid4
Member
If I could revisit the post below that juuser was gracious enough to help with.
https://fabrikar.com/forums/index.p...ate_time-advanced-dates-for-choose-date.51922
I'm needing similar functionality again for another project but this time I need the Time Selector turned off. In short, I'm comparing the clicked date with another date to determine if that date is allowed or not, if not show an alert(). I do have an on submission validation that runs as well, but the client wants this alert.
For testing, I'm attempting to show the below onClick alert() when a date is clicked on within the JDate's calendar popup, with the Time Selector turned off, but the calendar's "close" is fired before my alert() method fires so the popup calendar closes before my below test alert() shows.
With having the "Show time selector" setting set to "Yes" keeps the calendar up that's not an issue and the alert shows, only when it is set to "No".
I've been trying with the code in different locations (form_x.js, top of the template's header, within the element JS, etc), searching Google for clues and coding techniques, but can't figure a way to get my alert to fire first when the Time Selector is turned off. Would anyone have an idea? Or at least if that it is not possible and I'll chalk it up as that.
Thanks!
https://fabrikar.com/forums/index.p...ate_time-advanced-dates-for-choose-date.51922
I'm needing similar functionality again for another project but this time I need the Time Selector turned off. In short, I'm comparing the clicked date with another date to determine if that date is allowed or not, if not show an alert(). I do have an on submission validation that runs as well, but the client wants this alert.
For testing, I'm attempting to show the below onClick alert() when a date is clicked on within the JDate's calendar popup, with the Time Selector turned off, but the calendar's "close" is fired before my alert() method fires so the popup calendar closes before my below test alert() shows.
With having the "Show time selector" setting set to "Yes" keeps the calendar up that's not an issue and the alert shows, only when it is set to "No".
JavaScript:
jQuery(function($) {
$("body").delegate("td.day", "click", function() {
alert("A date was clicked!");
});
});
I've been trying with the code in different locations (form_x.js, top of the template's header, within the element JS, etc), searching Google for clues and coding techniques, but can't figure a way to get my alert to fire first when the Time Selector is turned off. Would anyone have an idea? Or at least if that it is not possible and I'll chalk it up as that.
Thanks!