enable/disable days in element date

OK, I just tried logging in to the backend again, and it took almost 45 seconds just to log me in.

I'm going to reboot my laptop, my router and my cable modem, just to be sure it's not some issue on my network.

--hugh
 
hugh, I'm on skype, please contact me there. if going very slow, make a copy with Akeeba. I have no problems from here to access the backend.
 
Guys, you are a thousand things, but a month I'm trying to do this and I already ends on time.
This client is very important to me, and do not want to lose.
If hugh is very busy, you can help someone else?
 
Here's a summary of what we did to get this to work:

Created a form PHP plugin, run at the top of the form with this php

PHP:
<?php
// Query the database to get the events:
$db = JFactory::getDbo();
$query = $db->getQuery(true);
$query->select('*')->from('imagina_canal')->where('Cantidad_de_inscripciones > 0');
$db->setQuery($query);
$rows = $db->loadObjectList();
$json = array();
 
foreach ($rows as $row)
{
$key = $row->Regiones_cascading . '.' . $row->Ciudades_cascada;
 
if (!array_key_exists($key, $json))
{
$json[$key] = array();
}
 
$date = JFactory::getDate($row->fecha);
$json[$key][] = $date->toISO8601();
}
 
// Inject the events into the browser as a global Javascript variable.
 
echo '<script type="text/javascript">';
echo "inscriptionEvents = " . json_encode($json);
echo '</script>';

Edit the calendar date element and set the allow js script

JavaScript:
var els = Fabrik.getBlock('form_1').elements;
var region = els.inscrpcion___Region_cascadin.get('value');
var city = els.inscrpcion___ciudad_cascading.get('value');
var key = region + '.' + city;
 
// Get the data created by the PHP plugin
var allowedDates = inscriptionEvents[key];
var result = true;
 
date = new Date(date);
if (typeOf(allowedDates) !== 'null') {
for (i = 0; i < allowedDates.length; i++) {
var td = new Date(allowedDates[i]);
if (date.getUTCFullYear() == td.getUTCFullYear() && date.getUTCMonth() == td.getUTCMonth() && date.getUTCDate() == td.getUTCDate()) {
// A date has been found.
result = false;
}
}
}
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top