function drawCodeExampledrawDatefield() {
varlet canvas = $('<div />').addClass('widget-container');
var codeContainerreadOnly = false;
$('<div<label />').addClass('widget code-container ui-corner-all');, {
var captionContainer = $('<div />').addClass('caption-container');
$('<span />'for': 'w1',
{ 'text': 'CodeDatefield exampleExample'
}).addClass('captionappendTo(canvas);
var inputContainer = $('<div />').appendTo(captionContaineraddClass('widget input dateinput');
captionContainerinputContainer.appendTo(codeContainercanvas);
var codeContentcanvasInput = $('<pre<input />', {
'id': 'w0w1',
}).addClass("code").appendTo(codeContainer);
'type': 'text',
var lines = ['select * from person'disabled': readOnly,
'select * from person where _id_ = ...']
'placeholder': appConfig.dateFormat
for (var i = 0; i < lines.length; i++) }).addClass('input').appendTo(inputContainer);
canvasInput.datepicker({
$('<span />'changeMonth: true,
{ changeYear: true,
'text': lines[i] yearRange: "c-100:c+100",
}).addClass("codeline").appendTo(codeContent); }dateFormat: 'yy-mm-dd'
codeContainer.appendTo(canvas});
canvas.appendTo($('#embeddedComponentContent'));
} |