0
我們使用javascript的prototype.js,但現在我們正在實現Kendo UI DatePicker,並且我對如何解決問題感到困惑。鑑於以下幾點:使用原型調用Kendo UI DatePicker
function MyClass()
{
this.Name = $('inputName');
this.LastName $('inputLastName');
this.GridViewInputs;
}
MyClass.prototype.init = function()
{
//some event observe methods here
}
MyClass.protype.setUpDatePickers = function()
{
//grab all input values from a gridview and attach a date picker to each
this.GridViewInputs = $$('.Dates');
//HERE IS MY PROBLEM, I AM NOT SURE HOW TO CALL THE FUNCTION BELOW FROM HERE
//AND PASSING IT EACH INPUT
}
$j(document).ready(function() {
// create DatePicker from input HTML element
$(myInput passed here).kendoDatePicker();
});
我的問題是,我真的不能使用this.GridViewInputs附加$ J函數內,因爲它會說,它不承認,我相信,因爲它的對象之外。
- 我可以在MyClass對象中包含這個調用,以便我可以傳遞我的值,我該怎麼做?