Skip to content

binding to controls must have unique ID #381

Open
@jackbrad

Description

@jackbrad

I am dynamically adding controls to the page and then calling

item.find('.DateTimeField').datetimepicker({ ampm: true });

the item object above is a clone of another object ....

when I tried to use the date time fields in the new object I got a failure
Unable to set value of the property 'currentDay': object is null or undefined

I used this to fix the issue:

//make all new datetimefields unique
//this cures a bug with the datatimepicker
item.find('.DateTimeField').each(function (i) {
var newId = jQuery(this).attr('id');
newId += "_" + counter++;
jQuery(this).attr('id', newId);
});

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions