03-03-2014 11:04 AM
//this is the .use() function
YUI().use('datatype-date-format', 'overlay', "node", "calendar", 'event-hover', function(Y) {
var
mouseover_calendar = false,
current_input = null,
mycalendar = new Y.Calendar({
contentBox: "#mycalendar",
visible: true,
render : true,
showPrevMonth: true,
showNextMonth: true
}).on({
'selectionChange': function(e) {
current_input.set('value', Y.DataType.Date.format(e.newSelection[0], {
format: '%d/%m/%Y'
}));
mouseover_calendar = false;
myoverlay.hide();
},
'mouseenter': function(e) {
mouseover_calendar = true;
},
'mouseleave': function(e) {
mouseover_calendar = false;
}
}),
myoverlay = new Y.Overlay({
boundingBox: "#myoverlay",
zIndex: 10,
render : true,
visible: false
}),
input_calendar = {
'blur': function(e) {
if (mouseover_calendar == false) {
'<div class="yui3-skin-sam">'
myoverlay.hide();
}
},
'focus': function(e) {
current_input = Y.one(e.target);
myoverlay.align(current_input, ['tl', 'bl']).show();
}
};
Y.all('input.af_calendar').on(input_calendar);
});
//I attached the html code then (a part of a my table)
03-06-2014 06:22 AM
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.