Advertisement
Guest User

Untitled

a guest
Aug 20th, 2019
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.07 KB | None | 0 0
  1. $('.calendar').pignoseCalendar({
  2. lang:'es',
  3.  
  4. theme: 'light',
  5.  
  6. schedules: [
  7. <?php echo json_encode($eventos_json) ?>
  8. ],
  9. scheduleOptions: {
  10. colors: {
  11. offer: '#2fabb7',
  12. ad: '#5c6270'
  13. }
  14. },
  15. select: function(date, context) {
  16. console.log(date);
  17. }
  18. });
  19.  
  20. public function dashboard() {
  21. $eventos = eventos();
  22.  
  23. $eventos_json = array();
  24.  
  25. foreach ($eventos as $item) {
  26.  
  27. $fila = array('name'=>'luis','date'=>substr($item['fecha_hora'],0,10));
  28. array_push($eventos_json, $fila);
  29. }
  30. //dd($eventos);
  31. return view('layouts.admin.paginas.dashboard',compact('eventos','eventos_json'));
  32. }
  33.  
  34. $('.calendar').pignoseCalendar({
  35. scheduleOptions: {
  36. colors: {
  37. offer: '#2fabb7',
  38. ad: '#5c6270'
  39. }
  40. },
  41. schedules: [{
  42. name: 'offer',
  43. date: '2017-02-08'
  44. }, {
  45. name: 'ad',
  46. date: '2017-02-08'
  47. }, {
  48. name: 'offer',
  49. date: '2017-02-05',
  50. }],
  51. select: function(date, context) {
  52. console.log('events for this date', context.storage.schedules);
  53. }
  54. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement