Good day! I have such a problem. I want to get a field on which you click, a calendar appears, choose a date and this field is filled. https://dojotoolkit.org/reference-guide/1.10/dijit/form/DateTextBox.html (the latest example is the link) Here is a screen of my result

Result

The problem is that it does not issue errors, but the parse is wrong. At the click of a calendar appears, but unformed and at the bottom of the page. Here are the pieces of my code: the template where I create the element

<div data-dojo-attach-point='changeDate' class='changeDataField'> <label for="calendarId">Выберите дату:</label> <input data-dojo-id="calendarId" type="text" name="calendar" data-dojo- type="dijit/form/DateTextBox" value="now" required="true" /> </div> 

Here is the code for parsing and adding modules. Parsing occurs in the setDate function.

 define("traffic/SheduleView", ["dojo/_base/declare", "dojo/_base/array", "dojo/dom-construct", "dojo/on", "dojo/dom-style", "dojo/query", "dijit/_Widget", "dijit/_TemplatedMixin", "dojo/window", "dojo/text!traffic/resources/SheduleView_template.html", "dojo/dom", "dojo/parser", "dijit/form/DateTextBox", "dojo/domReady!"], function(declare, array, dom_construct, on, dom_style, query, _Widget, _TemplatedMixin, win, template, dom, parser, DateTextBox) { 'use strict'; return declare("traffic.SheduleView", [_Widget, _TemplatedMixin], { templateString: template, constructor: function() { this.sheduleViewShow = false; }, postCreate: function() { console.log("postCreate"); var obj = this; on(window, 'resize', function() { obj.resize(); }); }, setDate: function() { parser.parse(); calendarId.set('value', calendarId.get('value')); }, 

Well, the html file. Settings dojo parseOnLoad disabled.

 var dojoConfig = { async: true, parseOnLoad: false, packages: [ { name: "traffic", location: "/arcgis_js_api/library/3.14/3.14/traffic_admin" } ] }; require(["dojo/dom", "esri/map", "esri/layers/OpenStreetMapLayer", "dojo/_base/connect", "dojo/on", "dojo/dom-construct", "esri/dijit/Popup", "traffic/Chosen", "traffic/ControlWidjet", "traffic/RouteContainer", "traffic/StationContainer","traffic/XHR", "traffic/ObjectInfo", "traffic/VehicleList", "dojo/parser", "dijit/form/DateTextBox", "dojo/domReady!"], function(dom, Map, OpenStreetMapLayer, connect, on, domConstruct, Popup, Chosen, ControlWidjet, RouteContainer, StationContainer, XHR, ObjectInfo, VehicleList, parser, DateTextBox){ 

And the call to the setDate function in the html file.

 controlWidjet.sheduleView.setDate(); 

I can not figure out which day already. Maybe someone will understand me and tell you what's wrong? Thank you in advance!

    0