How obtain individual values of day, month and year, in calendar?

How obtain individual values of day, month and year, in calendar?,
in the “on: change”, i need the individual values.

this is my code:

var calendarModal = app.calendar.create({
inputEl: ‘#demo-calendar-modal’,
openIn: ‘customModal’,
on: {
change: function (calendar, value) {
console.log(value);
},
},
header: true,
footer: true,
dateFormat: ‘dd mm yyyy’,
headerPlaceholder: “Seleccione una fecha”,
toolbarCloseText: “Cerrar”,
monthNames: [‘Enero’, ‘Febrero’, ‘Marzo’, ‘Abril’, ‘Mayo’, ‘Junio’, ‘Julio’, ‘Augosto’ , ‘Septiembre’ , ‘Octubre’, ‘Noviembre’, ‘Diciembre’]
});

thanks

you can use moment.js its a very useful library to handel dates;
https://momentjs.com/

i resolved using the next code:

/*************************************** */
var calendarModal = app.calendar.create({
inputEl: ‘#demo-calendar-modal’,
openIn: ‘customModal’,
dateFormat: ‘dd mm yyyy’,
on: {
change: function (calendar, value) {
console.log(value[0]);

  var string = value[0]+ '';
  string = string.split(" ");
  var stringArray = new Array();
  for(var i =0; i < string.length; i++){
  stringArray.push(string[i]);
  if(i != string.length-1){stringArray.push(" ");} 
  console.log(i+":"+stringArray[i]);}
  console.log(stringArray[2]);
  if(stringArray[2]=="Jan") {stringArray[2]="01"};
  if(stringArray[2]=="Feb") {stringArray[2]="02"};
  if(stringArray[2]=="Mar") {stringArray[2]="03"};
  if(stringArray[2]=="Apr") {stringArray[2]="04"};
  if(stringArray[2]=="May") {stringArray[2]="05"};
  if(stringArray[2]=="Jun") {stringArray[2]="06"};
  if(stringArray[2]=="Jul") {stringArray[2]="07"};
  if(stringArray[2]=="Aug") {stringArray[2]="08"};
  if(stringArray[2]=="Sep") {stringArray[2]="09"};
  if(stringArray[2]=="Oct") {stringArray[2]="10"};
  if(stringArray[2]=="Nov") {stringArray[2]="11"};
  if(stringArray[2]=="Dec") {stringArray[2]="12"};
  console.log(stringArray[2]);

  fecha_hoy = stringArray[4]+"/"+stringArray[2]+"/"+stringArray[6];
  document.getElementById("fecha").innerHTML=fecha_hoy;

},

},
header: true,
footer: true,
headerPlaceholder: “Seleccione una fecha”,
toolbarCloseText: “Cerrar”,
monthNamesShort: [‘01’, ‘02’, ‘03’, ‘04’, ‘05’, ‘06’, ‘07’, ‘08’, ‘09’, ‘10’, ‘11’, ‘12’],
monthNames: [‘Enero’, ‘Febrero’, ‘Marzo’, ‘Abril’, ‘Mayo’, ‘Junio’, ‘Julio’, ‘Augosto’ , ‘Septiembre’ , ‘Octubre’, ‘Noviembre’, ‘Diciembre’]
});

Thanks

You should never do it like this, stringified date can be different depending on browser and language. Use Date’s getFullDay, getMonth and getDate methods https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date