place: function () {
var sourceItem = this.component ? this.component : this.element;
var offset = sourceItem.offset();
//var viewportOffset = this.$viewport.offset();
//var scrollTop = this.$viewport.scrollTop();
var zIndex = parseInt(this.element.parents().filter(function () {
var zIndex = $(this).css('z-index');
return zIndex != 'auto' && zIndex != '0';
}).first().css('z-index')) + 10;
//console.log('top: ' + (offset.top + this.height + scrollTop - viewportOffset.top));
//console.log('offset.top: ' + offset.top);
//console.log('this.height: ' + this.height);
//console.log('scrollTop: ' + scrollTop);
//console.log('viewportOffset.top: ' + viewportOffset.top);
if (this.calendarPlacement == 'left') {
this.picker.css({
top: offset.top + this.height,
left: offset.left + sourceItem[0].offsetWidth - this.picker[0].offsetWidth
});
} else {
this.picker.css({
top: offset.top + this.height,
left: offset.left,
zIndex : zIndex
});
}
},