I am using jquery full calendar to show some booking details. I am inserting date into the database in ("yyyy-MM-dd")
format.
But when i retrieve the title value from the calendar using var title=$("#calendar").fullCalendar('getView').title;
it output as "June 2015". later i am using these two days for a comparison. Therefor i need to either send date into the database in "19 June 2015" format or convert title date value into "06 2015".
If anyone has a clear idea about this help me. Hope the problem is clear. I am using codeignier and i use the following cotroller method to send the data into the database.
function add_reservation() {
$reservation_model = new Reservation_model();
$reservation_service = new Reservation_service();
$reservation_model->set_date_cal(trim($this->input->post('date', TRUE)));
// $reservation_model->set_date(strtotime($this->input->post('date', TRUE)));
$reservation_model->set_title(trim($this->input->post('selected_hall', TRUE)));
$reservation_model->set_type(trim($this->input->post('selected_time', TRUE)));
$reservation_model->set_description(trim($this->input->post('name', TRUE)));
$reservation_model->set_advanced_payment_status(trim($this->input->post('optionsRadios', TRUE)));
//$reservation_model->set_advanced_payment_status(trim($this->input->post('no', TRUE)));
$reservation_model->set_paid_amount(trim($this->input->post('paid_amount', TRUE)));
$reservation_model->set_fax(trim($this->input->post('fax', TRUE)));
$reservation_model->set_telephone_number(trim($this->input->post('telephone', TRUE)));
$reservation_model->set_address(trim($this->input->post('address', TRUE)));
$reservation_model->set_menu_no(trim($this->input->post('selected_menu_number', TRUE)));
$reservation_model->set_menu_price_per_plate(trim($this->input->post('menu_price', TRUE)));
$reservation_model->set_is_deleted('0');
$this->db->last_query();
echo $reservation_service->add_reservation($reservation_model);
}
basically i want to change the format of the date which i am sending to the database as "19 June 2015"