Created
September 20, 2012 13:13
-
-
Save lcruz/3755821 to your computer and use it in GitHub Desktop.
Agregar un evento via Titanium (Solo IOS)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Ejemplo del modulo Ttiatium-Calenadar disponible en: | |
* | |
* https://github.com/stelford/Titanium-Calendar | |
*/ | |
var btnAgendarCal = Titanium.UI.createButton({ | |
backgroundImage: '/images/btnAgendarCal.png', | |
left: 10, | |
width: 144, | |
height: 30, | |
}); | |
btnAgendarCal.addEventListener('click', function() { | |
var ticalendar = require("com.ti.calendar"); | |
var ev = ticalendar.createItem({title:"Evento creado por titanium", startDate: new Date()}); | |
var p = ev.saveEvent(); | |
if (p.error === 'none') { | |
alert('Evento creado con exito!'); | |
} else { | |
alert('No se ha podido crear el evento.'); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment