Hi Nazar,
I really appreciate your pickmeup plugin. I have integrated the plugin in a project I am working on.
What I have done until now is to initialize the plugin and passing some JSON encoded PHP value for the date selection.
Here’s my initialization of the plugin:
init_Calendar(<?php echo json_encode($newformat);?>,<?php echo json_encode($cal_nid);?>);
$('.pmu-selected').click(function(){
var nid = $(this).attr('id');
arr_calendar = <?php echo json_encode($cal_data);?>;
if(nid){
$('.modal-date').html(arr_calendar[nid].field_event_date);
$('.modal-title').html(arr_calendar[nid].field_event_title);
$('.modal-thumbnail').html(arr_calendar[nid].field_event_image);
$('.modal-description').html(arr_calendar[nid].field_event_description);
}
});
I have also modified your js so that when clicking a date on the calendar, a pop up will appear with some description as shown below:
However when the calendar load for the first time, everything works fine. I mean for example:
When clicking on the 02, my modal popup with content for the date 02. This is ok for all the date when clicked.
Now let’s assume I have clicked on the 10th and its content has been loaded in the modal.
Now if I clicked on the prev or next button and when I click on a date, it loads the modal with the content of the 10th and not the content of the date I just clicked.
To be honest, I don't think you need to modify anything, which is why I wouldn't dig into your mods.
You can achieve showing modal on click with regular event listener, demo: https://jsfiddle.net/y06mk8dr/
Hi Nazar, I really appreciate your pickmeup plugin. I have integrated the plugin in a project I am working on. What I have done until now is to initialize the plugin and passing some JSON encoded PHP value for the date selection. Here’s my initialization of the plugin:
init_Calendar(<?php echo json_encode($newformat);?>,<?php echo json_encode($cal_nid);?>);
I have also modified your js so that when clicking a date on the calendar, a pop up will appear with some description as shown below:![capture](https://cloud.githubusercontent.com/assets/4090517/22738702/e30713b4-ee21-11e6-8824-645029eff30c.PNG)
However when the calendar load for the first time, everything works fine. I mean for example: When clicking on the 02, my modal popup with content for the date 02. This is ok for all the date when clicked.
Now let’s assume I have clicked on the 10th and its content has been loaded in the modal. Now if I clicked on the prev or next button and when I click on a date, it loads the modal with the content of the 10th and not the content of the date I just clicked.
Can you help me with this?
pickmeup.min.zip
I am attaching the pickmeup.js.min file because i have made some slight modification to add ID's on the selected date.