Hello! want to know is there any date range picker node?
I saw the website "https://www.daterangepicker.com/" have the code for date range picker. How can I use it using template node and get an output msg.payload.
Screenshot
Hello! want to know is there any date range picker node?
I saw the website "https://www.daterangepicker.com/" have the code for date range picker. How can I use it using template node and get an output msg.payload.
Screenshot
try something like
(function(scope) {
$('#daterange').on('apply.daterangepicker', function(ev, picker) {
let payload = {};
payload.start = picker.startDate.format('YYYY-MM-DD');
payload.end = (picker.endDate.format('YYYY-MM-DD');
scope.send({payload:payload});
});
})(scope);
@Steve-Mcl , tried the script but not working.
I want to simplify my flow, presently I've given two date picker nodes and two time picker nodes.
so with date range picker was hoping to eliminate the need for four nodes and get separate payloads for
Share your flow & I will see why it is not working.
[{"id":"1a2367da.967f48","type":"ui_text","z":"453c408e.5a363","group":"162e61a9.5d8dee","order":2,"width":4,"height":1,"name":"","label":"Posting Date :","format":"{{msg.payload}}","layout":"row-left","x":680,"y":120,"wires":[]},{"id":"d8b0fb0f.8736a8","type":"inject","z":"453c408e.5a363","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":true,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":370,"y":120,"wires":[["a5da386a.0c0a78"]]},{"id":"49117b6f.630c24","type":"ui_dropdown","z":"453c408e.5a363","name":"Breakdown reasons","label":"Breakdown reason","tooltip":"Breakdown reason","place":"Select Breakdown reason","group":"f9e41b13.1fe7a8","order":6,"width":10,"height":1,"passthru":false,"multiple":false,"options":[{"label":"","value":"","type":"str"}],"payload":"","topic":"Breakdown reason","topicType":"str","x":780,"y":1040,"wires":[["fffd80ea.2c3c2"]]},{"id":"a3a4c7bd.deae88","type":"ui_button","z":"453c408e.5a363","name":"","group":"f9e41b13.1fe7a8","order":11,"width":5,"height":1,"passthru":false,"label":"Submit","tooltip":"","color":"","bgcolor":"","icon":"","payload":"complete","payloadType":"str","topic":"","topicType":"str","x":740,"y":1140,"wires":[["9ed8f8ed.2f1198","bba0b80b.e16bc8"]]},{"id":"dbe09e62.cecee","type":"ui_table","z":"453c408e.5a363","group":"5179bc3b.985dd4","name":"submition report","order":1,"width":24,"height":2,"columns":[],"outputs":0,"cts":false,"x":1090,"y":1220,"wires":[]},{"id":"31a87a94.a69636","type":"join","z":"453c408e.5a363","name":"","mode":"custom","build":"object","property":"payload","propertyType":"msg","key":"topic","joiner":"\\n","joinerType":"str","accumulate":false,"timeout":"","count":"","reduceRight":false,"reduceExp":"","reduceInit":"","reduceInitType":"","reduceFixup":"","x":1550,"y":600,"wires":[["e87bbb54.9ec938"]]},{"id":"c808e044.b8da5","type":"link in","z":"453c408e.5a363","name":"","links":["20b699b3.0c4866"],"x":155,"y":800,"wires":[["a060ed65.d10d7"]]},{"id":"20b699b3.0c4866","type":"link out","z":"453c408e.5a363","name":"","links":["c808e044.b8da5","1b6e86a3.1dcec9","fad78231.b3466","33c022c6.0cbefe","5f74164c.d57e48","1d4c2e6c.80d902","4266182d.72fee8"],"x":1305,"y":1160,"wires":[]},{"id":"9ed8f8ed.2f1198","type":"change","z":"453c408e.5a363","name":"","rules":[{"t":"move","p":"payload","pt":"msg","to":"complete","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1000,"y":1120,"wires":[["ae21f21d.2c7cf"]]},{"id":"bba0b80b.e16bc8","type":"change","z":"453c408e.5a363","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"[]","tot":"json"}],"action":"","property":"","from":"","to":"","reg":false,"x":990,"y":1160,"wires":[["a978eb18.57f9e8"]]},{"id":"a978eb18.57f9e8","type":"delay","z":"453c408e.5a363","name":"","pauseType":"delay","timeout":"2","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":1170,"y":1160,"wires":[["20b699b3.0c4866"]]},{"id":"a060ed65.d10d7","type":"change","z":"453c408e.5a363","name":"0","rules":[{"t":"set","p":"payload","pt":"msg","to":"0","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":270,"y":800,"wires":[["a0f58825.274978"]]},{"id":"b055a772.eaf5a8","type":"file","z":"453c408e.5a363","name":"breakdown.csv","filename":"D:\\testing\\breakdown.csv","appendNewline":true,"createDir":true,"overwriteFile":"false","encoding":"none","x":1720,"y":680,"wires":[[]]},{"id":"11ce6c04.e48dd4","type":"file in","z":"453c408e.5a363","name":"submition report","filename":"D:\\testing\\breakdown.csv","format":"utf8","chunk":false,"sendError":false,"encoding":"none","x":770,"y":1220,"wires":[["630a7385.c0c5fc"]]},{"id":"630a7385.c0c5fc","type":"csv","z":"453c408e.5a363","name":"","sep":",","hdrin":true,"hdrout":"all","multi":"mult","ret":"\\r\\n","temp":"","skip":"0","strings":true,"include_empty_strings":false,"include_null_values":false,"x":940,"y":1220,"wires":[["dbe09e62.cecee"]]},{"id":"bbb59193.27b94","type":"link in","z":"453c408e.5a363","name":"","links":["8486c63b.61dda8","24ca2b7f.f17ad4","86323abd.953778","1fc78245.60a78e","ae21f21d.2c7cf","fffd80ea.2c3c2","4d13e154.b1604","2c4436c6.2f30ba","64227da5.45c0e4","4ca1550c.20813c","76c3eb31.9014a4"],"x":1435,"y":600,"wires":[["31a87a94.a69636"]]},{"id":"ae21f21d.2c7cf","type":"link out","z":"453c408e.5a363","name":"","links":["bbb59193.27b94","4a35e5fc.12375c"],"x":1305,"y":1120,"wires":[]},{"id":"fffd80ea.2c3c2","type":"link out","z":"453c408e.5a363","name":"","links":["bbb59193.27b94"],"x":1025,"y":1040,"wires":[]},{"id":"1b6e86a3.1dcec9","type":"link in","z":"453c408e.5a363","name":"","links":["20b699b3.0c4866"],"x":625,"y":1040,"wires":[["49117b6f.630c24"]]},{"id":"a0f58825.274978","type":"link out","z":"453c408e.5a363","name":"","links":[],"x":415,"y":800,"wires":[]},{"id":"2c4436c6.2f30ba","type":"link out","z":"453c408e.5a363","name":"","links":["bbb59193.27b94"],"x":615,"y":160,"wires":[]},{"id":"407f1a6a.5b5bc4","type":"csv","z":"453c408e.5a363","name":"","sep":",","hdrin":true,"hdrout":"none","multi":"mult","ret":"\\n","temp":"","skip":"0","strings":true,"include_empty_strings":"","include_null_values":"","x":630,"y":340,"wires":[["2a14635.4eb5e9c"]]},{"id":"2a14635.4eb5e9c","type":"change","z":"453c408e.5a363","name":"","rules":[{"t":"set","p":"options","pt":"msg","to":"[$distinct(payload.Work_Center)]","tot":"jsonata"},{"t":"move","p":"payload","pt":"msg","to":"csv","tot":"flow"}],"action":"","property":"","from":"","to":"","reg":false,"x":720,"y":380,"wires":[["866f5f89.dbd61"]]},{"id":"866f5f89.dbd61","type":"ui_dropdown","z":"453c408e.5a363","name":"Work center","label":"Work center","tooltip":"","place":"select","group":"f9e41b13.1fe7a8","order":1,"width":6,"height":1,"passthru":false,"multiple":false,"options":[{"label":"","value":"","type":"str"}],"payload":"","topic":"Work_Center","topicType":"str","x":790,"y":420,"wires":[["612687cc.7091d8","64227da5.45c0e4"]]},{"id":"612687cc.7091d8","type":"change","z":"453c408e.5a363","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"[$flowContext(\"csv\")[Work_Center = $$.payload]] ","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":900,"y":460,"wires":[["b4b4f062.abe9b","4f4f67bd.5a6f48"]]},{"id":"e4a27a07.f30178","type":"file in","z":"453c408e.5a363","name":"mt02order","filename":"C:\\Users\\Sahil\\Desktop\\testing\\mt02order.csv","format":"utf8","chunk":false,"sendError":false,"encoding":"none","x":550,"y":300,"wires":[["407f1a6a.5b5bc4"]]},{"id":"b4b4f062.abe9b","type":"change","z":"453c408e.5a363","name":"","rules":[{"t":"set","p":"options","pt":"msg","to":"[$distinct(payload.Order_No)]","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":1000,"y":500,"wires":[["58c5f212.4ddaac"]]},{"id":"58c5f212.4ddaac","type":"ui_dropdown","z":"453c408e.5a363","name":"Order No.","label":"Order No.","tooltip":"","place":"Select","group":"f9e41b13.1fe7a8","order":2,"width":7,"height":1,"passthru":false,"multiple":false,"options":[{"label":"","value":"","type":"str"}],"payload":"","topic":"Order_No","topicType":"msg","x":1100,"y":540,"wires":[["4ca1550c.20813c","d0bb29bc.fb95d8"]]},{"id":"c9de024b.950e2","type":"template","z":"453c408e.5a363","name":"simulate file - mt02order","field":"payload","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"Order_No,Work_Center,Material,Work_Center_Description,Cycle_TIme,Material_Description,Order_Qty,Confirm_Qty,Creation_date,Pending_Qty,Person_Responsible,Plant,Drg_No\n,,,,,,,,,,,,\n100070432,M02HD008,C-M-201-0696-01,HD008 HEADER,3,SHAFT SWING ARM UPTO COLD FORGING,750,750,08.06.2021,0,RAM SINGH,MT02,M-0696\n100070441,M02MBF01,C-M-201-3449-02,MBF1 MBF HARDENING & WASHING,1.67,BOLT SWING ARM PIVOT UPTO HT,\"3,000.00\",\"1,076.00\",08.06.2021,\"1,924.00\",PAWAN,MT02,M-3449\n100070296,M02MBF01,C-M-201-3449-02,MBF1 MBF HARDENING & WASHING,1.67,BOLT SWING ARM PIVOT UPTO HT,\"2,000.00\",\"2,000.00\",05.06.2021,0,PAWAN,MT02,M-3449\n100070441,M02ST003,C-M-201-3449-03,ST03 STRAIGHTENING,8,BOLT SWING ARM PIVOT UPTO STRAIGHTENING,\"3,000.00\",\"1,076.00\",08.06.2021,\"1,924.00\",AMIT SHARMA,MT02,M-3449\n100070296,M02ST003,C-M-201-3449-03,ST03 STRAIGHTENING,8,BOLT SWING ARM PIVOT UPTO STRAIGHTENING,\"2,000.00\",\"2,000.00\",05.06.2021,0,AMIT SHARMA,MT02,M-3449\n100070297,M02CL013,C-M-201-3449-04,CL13 CENTRE LESS GRINDER,7,BOLT SWING ARM PIVOT UPTO DIA HALF GRIND,\"2,000.00\",\"2,000.00\",05.06.2021,0,AMIT SHARMA,MT02,M-3449\n100070441,M02CL013,C-M-201-3449-04,CL13 CENTRE LESS GRINDER,7,BOLT SWING ARM PIVOT UPTO DIA HALF GRIND,\"3,000.00\",\"1,076.00\",08.06.2021,\"1,924.00\",AMIT SHARMA,MT02,M-3449\n100070297,M02CL013,C-M-201-3449-05,CL13 CENTRE LESS GRINDER,6,BOLT SWING ARM PIVOT UPTO DIA FINAL GRIN,\"2,000.00\",\"2,000.00\",05.06.2021,0,AMIT SHARMA,MT02,M-3449\n100070441,M02CL013,C-M-201-3449-05,CL13 CENTRE LESS GRINDER,6,BOLT SWING ARM PIVOT UPTO DIA FINAL GRIN,\"3,000.00\",\"1,076.00\",08.06.2021,\"1,924.00\",AMIT SHARMA,MT02,M-3449\n100070441,M02TR007,C-M-201-3449-06,TR07 THREAD ROLLING,7,BOLT SWING ARM PIVOT UPTO THREAD ROLLING,\"3,000.00\",\"1,076.00\",08.06.2021,\"1,924.00\",AMIT SHARMA,MT02,M-3449\n100070298,M02TR007,C-M-201-3449-06,TR07 THREAD ROLLING,7,BOLT SWING ARM PIVOT UPTO THREAD ROLLING,\"2,000.00\",\"2,000.00\",05.06.2021,0,AMIT SHARMA,MT02,M-3449\n100070356,M02SB001,C-M-219-0286-04,SB01 SHOT BLASTING,7.2,PINION KICK STARTER UPTO SHOT BLASTING,\"15,911.00\",\"4,420.00\",07.06.2021,\"11,491.00\",UDAY THAKUR,MT02,M-0286\n100070512,M02SB001,C-M-219-0286-04,SB01 SHOT BLASTING,7.2,PINION KICK STARTER UPTO SHOT BLASTING,\"29,975.00\",\"1,600.00\",10.06.2021,\"28,375.00\",UDAY THAKUR,MT02,M-0286\n100070356,M02PH001,C-M-219-0286-05,PT PHOSPHATING TANKS,2,PINION KICK STARTER UPTO ZINK PH. & SOAP,\"31,861.00\",\"6,020.00\",07.06.2021,\"25,841.00\",UDAY THAKUR,MT02,M-0286\n100070356,M02KP003,C-M-219-0286-06,KP03 COLD FORGING,8,PINION KICK STARTER UPTO RT.COLD FORGING,\"31,861.00\",\"6,020.00\",07.06.2021,\"25,841.00\",UDAY THAKUR,MT02,M-0286\n100070420,M02CN001,C-M-219-0286-07,CNC01 TURNING CENTRE,55,PINION KICK STARTER UPTO CNC TURNING 1ST,\"12,501.00\",\"1,472.00\",08.06.2021,\"11,029.00\",ASHOK THAKUR,MT02,M-0286\n100070420,M02CN002,C-M-219-0286-07,CNC02 TURNING CENTRE,55,PINION KICK STARTER UPTO CNC TURNING 1ST,\"10,000.00\",\"1,611.00\",08.06.2021,\"8,389.00\",ASHOK THAKUR,MT02,M-0286\n100070420,M02CN005,C-M-219-0286-07,CNC05 TURNING CENTRE,65,PINION KICK STARTER UPTO CNC TURNING 1ST,\"5,000.00\",\"1,393.00\",08.06.2021,\"3,607.00\",ASHOK THAKUR,MT02,M-0286\n100070420,M02CN006,C-M-219-0286-07,CNC06 TURNING CENTRE,65,PINION KICK STARTER UPTO CNC TURNING 1ST,\"5,000.00\",\"1,599.00\",08.06.2021,\"3,401.00\",ASHOK THAKUR,MT02,M-0286\n100070420,M02CN003,C-M-219-0286-08,CNC03 TURNING CENTRE,60,PINION KICK STARTER UPTO CNC TURNING 2ND,\"12,862.00\",\"1,402.00\",08.06.2021,\"11,460.00\",ASHOK THAKUR,MT02,M-0286\n100070420,M02CN004,C-M-219-0286-08,CNC04 TURNING CENTRE,60,PINION KICK STARTER UPTO CNC TURNING 2ND,\"10,000.00\",\"1,661.00\",08.06.2021,\"8,339.00\",ASHOK THAKUR,MT02,M-0286\n100070420,M02CN007,C-M-219-0286-08,CNC07 TURNING CENTRE,60,PINION KICK STARTER UPTO CNC TURNING 2ND,\"5,000.00\",\"1,671.00\",08.06.2021,\"3,329.00\",ASHOK THAKUR,MT02,M-0286\n100070420,M02CN008,C-M-219-0286-08,CNC08 TURNING CENTRE,60,PINION KICK STARTER UPTO CNC TURNING 2ND,\"5,000.00\",\"1,336.00\",08.06.2021,\"3,664.00\",ASHOK THAKUR,MT02,M-0286\n100070420,M02HB004,C-M-219-0286-09,M02HB004-HOBBING,25,PINION KICK STARTER UPTO GEAR CUTTING,\"33,817.00\",\"5,450.00\",08.06.2021,\"28,367.00\",RAJA BABU,MT02,M-0286\n100070374,M02GCF02,C-M-219-0286-10,GCF02 GAS CARBURISING FURNACE,14,PINION KICK STARTER UPTO HT,\"3,500.00\",\"3,200.00\",07.06.2021,300,PAWAN,MT02,M-0286\n100070319,M02SB002,C-M-219-0286-11,SB02 SHOT BLASTING,2,PINION KICK STARTER UPTO SHOT BLASTING,\"35,001.00\",\"4,691.00\",05.06.2021,\"30,310.00\",UDAY THAKUR,MT02,M-0286","output":"str","x":590,"y":260,"wires":[[]]},{"id":"4f4f67bd.5a6f48","type":"ui_table","z":"453c408e.5a363","group":"f9e41b13.1fe7a8","name":"","order":5,"width":24,"height":3,"columns":[],"outputs":0,"cts":false,"x":1170,"y":280,"wires":[]},{"id":"d1c0df0e.eb48f","type":"ui_button","z":"453c408e.5a363","name":"Fetch Order No.","group":"162e61a9.5d8dee","order":3,"width":3,"height":1,"passthru":false,"label":"Fetch Order No.","tooltip":"","color":"","bgcolor":"","icon":"","payload":"","payloadType":"date","topic":"fetchorderno","topicType":"msg","x":340,"y":300,"wires":[["e4a27a07.f30178"]]},{"id":"33c022c6.0cbefe","type":"link in","z":"453c408e.5a363","name":"","links":["20b699b3.0c4866"],"x":675,"y":480,"wires":[["866f5f89.dbd61"]]},{"id":"fad78231.b3466","type":"link in","z":"453c408e.5a363","name":"","links":["20b699b3.0c4866"],"x":975,"y":560,"wires":[["58c5f212.4ddaac"]]},{"id":"4ca1550c.20813c","type":"link out","z":"453c408e.5a363","name":"","links":["bbb59193.27b94"],"x":1215,"y":480,"wires":[]},{"id":"64227da5.45c0e4","type":"link out","z":"453c408e.5a363","name":"","links":["bbb59193.27b94"],"x":915,"y":400,"wires":[]},{"id":"5f74164c.d57e48","type":"link in","z":"453c408e.5a363","name":"","links":["20b699b3.0c4866"],"x":1135,"y":380,"wires":[["4f4f67bd.5a6f48"]]},{"id":"e87bbb54.9ec938","type":"csv","z":"453c408e.5a363","name":"","sep":",","hdrin":true,"hdrout":"all","multi":"one","ret":"\\n","temp":"","skip":"0","strings":true,"include_empty_strings":"","include_null_values":"","x":1630,"y":640,"wires":[["b055a772.eaf5a8","5fe033d2.7faaac","64265b7.67d13a4"]]},{"id":"5fe033d2.7faaac","type":"debug","z":"453c408e.5a363","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":1810,"y":600,"wires":[]},{"id":"4a35e5fc.12375c","type":"link in","z":"453c408e.5a363","name":"","links":["ae21f21d.2c7cf"],"x":505,"y":1220,"wires":[["9740e705.9336b8"]]},{"id":"9740e705.9336b8","type":"delay","z":"453c408e.5a363","name":"","pauseType":"delay","timeout":"2","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":610,"y":1220,"wires":[["11ce6c04.e48dd4"]]},{"id":"64265b7.67d13a4","type":"ui_toast","z":"453c408e.5a363","position":"top right","displayTime":"3","highlight":"","sendall":false,"outputs":0,"ok":"OK","cancel":"","raw":true,"topic":"","name":"","x":1890,"y":640,"wires":[]},{"id":"a5da386a.0c0a78","type":"function","z":"453c408e.5a363","name":"date","func":"var d = new Date(msg.payload);\nvar day = d.getDate();\nvar month = d.getMonth();\nvar monthformat = month + 1;\nvar year = d.getFullYear();\nmsg.payload = day +\"-\"+ monthformat +\"-\"+ year;\nmsg.topic = 'Posting_date';\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":510,"y":120,"wires":[["2c4436c6.2f30ba","1a2367da.967f48"]]},{"id":"ab073e11.935d1","type":"ui_media","z":"453c408e.5a363","group":"162e61a9.5d8dee","name":"","width":1,"height":1,"order":1,"category":"logo","file":"logo transparent.png","layout":"adjust","showcontrols":false,"loop":false,"onstart":false,"scope":"local","tooltip":"","x":210,"y":120,"wires":[[]]},{"id":"d0bb29bc.fb95d8","type":"debug","z":"453c408e.5a363","name":"","active":true,"tosidebar":true,"console":false,"tostatus":true,"complete":"payload","targetType":"msg","statusVal":"payload","statusType":"auto","x":1290,"y":540,"wires":[]},{"id":"bd602405.bccc98","type":"csv","z":"453c408e.5a363","name":"","sep":",","hdrin":true,"hdrout":"none","multi":"mult","ret":"\\n","temp":"","skip":"0","strings":true,"include_empty_strings":"","include_null_values":"","x":410,"y":1080,"wires":[["5c835b0.96b11a4"]]},{"id":"5c835b0.96b11a4","type":"change","z":"453c408e.5a363","name":"","rules":[{"t":"set","p":"options","pt":"msg","to":"$distinct(payload.Breakdown_reason)","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":500,"y":1120,"wires":[["49117b6f.630c24"]]},{"id":"8efa1e6d.15ad","type":"template","z":"453c408e.5a363","name":"simulate file - breakdown reason","field":"payload","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"Breakdown_reason\nWarming up time\nNo raw material\nInsert change or adjustment\nMachine accident\nTool not available\nNo operator\nInspection time\nMachine cleaning\nPreventive maintenance\nNew part development\nLate start early stoppage\nLoad unload\nSpindle off time\nAxis off time\nMachine off time\nRework\nSetup\nMaintenance\nExcess load unload\nMachine breakdown\nSchedule closure\nSmall stop losses\nPlanned idle time\nReason unknown\nNo data","output":"str","x":270,"y":1040,"wires":[["bd602405.bccc98"]]},{"id":"6f66442a.45768c","type":"file in","z":"453c408e.5a363","name":"Breakdown reasons","filename":"C:\\Users\\Sahil\\Desktop\\testing\\breakdown_reasons.csv","format":"utf8","chunk":false,"sendError":false,"encoding":"none","x":200,"y":1080,"wires":[[]]},{"id":"3d292329.c239fc","type":"inject","z":"453c408e.5a363","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":true,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":150,"y":1000,"wires":[["8efa1e6d.15ad"]]},{"id":"342ded40.0794a2","type":"group","z":"453c408e.5a363","style":{"stroke":"#999999","stroke-opacity":"1","fill":"none","fill-opacity":"1","label":true,"label-position":"nw","color":"#a4a4a4"},"nodes":["a24efb2d.c8af98","ccaeb9ec.f7a9f8","76c3eb31.9014a4","4266182d.72fee8"],"x":494,"y":559,"w":362,"h":122},{"id":"a24efb2d.c8af98","type":"ui_template","z":"453c408e.5a363","g":"342ded40.0794a2","group":"f9e41b13.1fe7a8","name":"Select Date | Time","order":3,"width":7,"height":1,"format":"<script type=\"text/javascript\" src=\"https://cdn.jsdelivr.net/jquery/latest/jquery.min.js\"></script>\n<script type=\"text/javascript\" src=\"https://cdn.jsdelivr.net/momentjs/latest/moment.min.js\"></script>\n<script type=\"text/javascript\" src=\"https://cdn.jsdelivr.net/npm/daterangepicker/daterangepicker.min.js\"></script>\n<link rel=\"stylesheet\" type=\"text/css\" href=\"https://cdn.jsdelivr.net/npm/daterangepicker/daterangepicker.css\" />\n<input type=\"text\" name=\"datetimes\" />\n<script>\n$(function() {\n $('input[name=\"datetimes\"]').daterangepicker({\n timePicker: true,\n startDate: moment().startOf('hour'),\n endDate: moment().startOf('hour').add(32, 'hour'),\n locale: {\n format: 'M/DD hh:mm A'\n }\n });\n});\n</script>","storeOutMessages":true,"fwdInMessages":true,"resendOnRefresh":true,"templateScope":"local","x":690,"y":640,"wires":[["76c3eb31.9014a4"]]},{"id":"ccaeb9ec.f7a9f8","type":"comment","z":"453c408e.5a363","g":"342ded40.0794a2","name":"update","info":"","x":650,"y":600,"wires":[]},{"id":"76c3eb31.9014a4","type":"link out","z":"453c408e.5a363","g":"342ded40.0794a2","name":"","links":["bbb59193.27b94"],"x":815,"y":640,"wires":[]},{"id":"4266182d.72fee8","type":"link in","z":"453c408e.5a363","g":"342ded40.0794a2","name":"","links":["20b699b3.0c4866"],"x":535,"y":640,"wires":[["a24efb2d.c8af98"]]},{"id":"162e61a9.5d8dee","type":"ui_group","name":"Heading","tab":"74fd02f9.b99b3c","order":1,"disp":false,"width":"24","collapse":false},{"id":"f9e41b13.1fe7a8","type":"ui_group","name":"form","tab":"74fd02f9.b99b3c","order":3,"disp":false,"width":"24","collapse":false},{"id":"5179bc3b.985dd4","type":"ui_group","name":"Entry Confirmation","tab":"74fd02f9.b99b3c","order":4,"disp":true,"width":24,"collapse":false},{"id":"74fd02f9.b99b3c","type":"ui_tab","name":"Breakdown entry form","icon":"dashboard","order":1,"disabled":false,"hidden":false}]
Try this...
[{"id":"d3a08df34c80da26","type":"ui_template","z":"3422959b.40de62","group":"dce9e7a2.d20c78","name":"HEAD scripts and css","order":6,"width":0,"height":0,"format":"\n<script type=\"text/javascript\" src=\"https://cdn.jsdelivr.net/momentjs/latest/moment.min.js\"></script>\n<script type=\"text/javascript\" src=\"https://cdn.jsdelivr.net/npm/daterangepicker/daterangepicker.min.js\"></script>\n<link rel=\"stylesheet\" type=\"text/css\" href=\"https://cdn.jsdelivr.net/npm/daterangepicker/daterangepicker.css\" />","storeOutMessages":true,"fwdInMessages":true,"resendOnRefresh":true,"templateScope":"global","className":"","x":1410,"y":560,"wires":[[]]},{"id":"c38c270948239c48","type":"ui_template","z":"3422959b.40de62","group":"dce9e7a2.d20c78","name":"","order":7,"width":"0","height":"0","format":"\n<input type=\"text\" id=\"daterange1\" />\n\n<script>\n \n const scope = this.scope;\n $('#daterange1').daterangepicker({\n timePicker: true,\n locale: {\n format: 'YYYY-MM-DD hh:mm A'\n }\n });\n $('#daterange1').on('apply.daterangepicker', function(ev, picker) {\n let payload = {};\n payload.startDate = picker.startDate.format('YYYY-MM-DD');\n payload.endDate = picker.endDate.format('YYYY-MM-DD');\n payload.startTime = picker.startDate.format('HH:mm:ss');\n payload.endTime = picker.endDate.format('HH:mm:ss');\n scope.send({payload:payload});\n });\n\n</script>\n","storeOutMessages":true,"fwdInMessages":true,"resendOnRefresh":true,"templateScope":"local","className":"","x":1380,"y":620,"wires":[["e406483b65814957"]]},{"id":"e406483b65814957","type":"debug","z":"3422959b.40de62","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":1550,"y":620,"wires":[]},{"id":"dce9e7a2.d20c78","type":"ui_group","name":"Object detection","tab":"5132060d.4cde48","order":1,"disp":true,"width":"9","collapse":false},{"id":"5132060d.4cde48","type":"ui_tab","name":"Home","icon":"dashboard","disabled":false,"hidden":false}]
working example...
outputs...
doesn't work when I import your flow.
it works for me.
export your flow once more and i will see what you did.
when I click date selection field nothing shows up for selecting.
[{"id":"1a2367da.967f48","type":"ui_text","z":"453c408e.5a363","group":"162e61a9.5d8dee","order":2,"width":4,"height":1,"name":"","label":"Posting Date :","format":"{{msg.payload}}","layout":"row-left","x":680,"y":120,"wires":[]},{"id":"d8b0fb0f.8736a8","type":"inject","z":"453c408e.5a363","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":true,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":370,"y":120,"wires":[["a5da386a.0c0a78"]]},{"id":"49117b6f.630c24","type":"ui_dropdown","z":"453c408e.5a363","name":"Breakdown reasons","label":"Breakdown reason","tooltip":"Breakdown reason","place":"Select Breakdown reason","group":"f9e41b13.1fe7a8","order":4,"width":10,"height":1,"passthru":false,"multiple":false,"options":[{"label":"","value":"","type":"str"}],"payload":"","topic":"Breakdown reason","topicType":"str","x":780,"y":1040,"wires":[["fffd80ea.2c3c2"]]},{"id":"a3a4c7bd.deae88","type":"ui_button","z":"453c408e.5a363","name":"","group":"f9e41b13.1fe7a8","order":17,"width":5,"height":1,"passthru":false,"label":"Submit","tooltip":"","color":"","bgcolor":"","icon":"","payload":"complete","payloadType":"str","topic":"","topicType":"str","x":740,"y":1140,"wires":[["9ed8f8ed.2f1198","bba0b80b.e16bc8"]]},{"id":"dbe09e62.cecee","type":"ui_table","z":"453c408e.5a363","group":"5179bc3b.985dd4","name":"submition report","order":1,"width":24,"height":2,"columns":[],"outputs":0,"cts":false,"x":1090,"y":1220,"wires":[]},{"id":"31a87a94.a69636","type":"join","z":"453c408e.5a363","name":"","mode":"custom","build":"object","property":"payload","propertyType":"msg","key":"topic","joiner":"\\n","joinerType":"str","accumulate":false,"timeout":"","count":"","reduceRight":false,"reduceExp":"","reduceInit":"","reduceInitType":"","reduceFixup":"","x":1550,"y":600,"wires":[["e87bbb54.9ec938"]]},{"id":"c808e044.b8da5","type":"link in","z":"453c408e.5a363","name":"","links":["20b699b3.0c4866"],"x":155,"y":800,"wires":[["a060ed65.d10d7"]]},{"id":"20b699b3.0c4866","type":"link out","z":"453c408e.5a363","name":"","links":["c808e044.b8da5","1b6e86a3.1dcec9","fad78231.b3466","33c022c6.0cbefe","5f74164c.d57e48","1d4c2e6c.80d902","4266182d.72fee8"],"x":1305,"y":1160,"wires":[]},{"id":"9ed8f8ed.2f1198","type":"change","z":"453c408e.5a363","name":"","rules":[{"t":"move","p":"payload","pt":"msg","to":"complete","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1000,"y":1120,"wires":[["ae21f21d.2c7cf"]]},{"id":"bba0b80b.e16bc8","type":"change","z":"453c408e.5a363","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"[]","tot":"json"}],"action":"","property":"","from":"","to":"","reg":false,"x":990,"y":1160,"wires":[["a978eb18.57f9e8"]]},{"id":"a978eb18.57f9e8","type":"delay","z":"453c408e.5a363","name":"","pauseType":"delay","timeout":"2","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":1170,"y":1160,"wires":[["20b699b3.0c4866"]]},{"id":"a060ed65.d10d7","type":"change","z":"453c408e.5a363","name":"0","rules":[{"t":"set","p":"payload","pt":"msg","to":"0","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":270,"y":800,"wires":[["a0f58825.274978"]]},{"id":"b055a772.eaf5a8","type":"file","z":"453c408e.5a363","name":"breakdown.csv","filename":"D:\\testing\\breakdown.csv","appendNewline":true,"createDir":true,"overwriteFile":"false","encoding":"none","x":1720,"y":680,"wires":[[]]},{"id":"11ce6c04.e48dd4","type":"file in","z":"453c408e.5a363","name":"submition report","filename":"D:\\testing\\breakdown.csv","format":"utf8","chunk":false,"sendError":false,"encoding":"none","x":770,"y":1220,"wires":[["630a7385.c0c5fc"]]},{"id":"630a7385.c0c5fc","type":"csv","z":"453c408e.5a363","name":"","sep":",","hdrin":true,"hdrout":"all","multi":"mult","ret":"\\r\\n","temp":"","skip":"0","strings":true,"include_empty_strings":false,"include_null_values":false,"x":940,"y":1220,"wires":[["dbe09e62.cecee"]]},{"id":"bbb59193.27b94","type":"link in","z":"453c408e.5a363","name":"","links":["8486c63b.61dda8","24ca2b7f.f17ad4","86323abd.953778","1fc78245.60a78e","ae21f21d.2c7cf","fffd80ea.2c3c2","4d13e154.b1604","2c4436c6.2f30ba","64227da5.45c0e4","4ca1550c.20813c","76c3eb31.9014a4"],"x":1435,"y":600,"wires":[["31a87a94.a69636"]]},{"id":"ae21f21d.2c7cf","type":"link out","z":"453c408e.5a363","name":"","links":["bbb59193.27b94","4a35e5fc.12375c"],"x":1305,"y":1120,"wires":[]},{"id":"fffd80ea.2c3c2","type":"link out","z":"453c408e.5a363","name":"","links":["bbb59193.27b94"],"x":1025,"y":1040,"wires":[]},{"id":"1b6e86a3.1dcec9","type":"link in","z":"453c408e.5a363","name":"","links":["20b699b3.0c4866"],"x":625,"y":1040,"wires":[["49117b6f.630c24"]]},{"id":"a0f58825.274978","type":"link out","z":"453c408e.5a363","name":"","links":[],"x":415,"y":800,"wires":[]},{"id":"2c4436c6.2f30ba","type":"link out","z":"453c408e.5a363","name":"","links":["bbb59193.27b94"],"x":615,"y":160,"wires":[]},{"id":"407f1a6a.5b5bc4","type":"csv","z":"453c408e.5a363","name":"","sep":",","hdrin":true,"hdrout":"none","multi":"mult","ret":"\\n","temp":"","skip":"0","strings":true,"include_empty_strings":"","include_null_values":"","x":630,"y":340,"wires":[["2a14635.4eb5e9c"]]},{"id":"2a14635.4eb5e9c","type":"change","z":"453c408e.5a363","name":"","rules":[{"t":"set","p":"options","pt":"msg","to":"[$distinct(payload.Work_Center)]","tot":"jsonata"},{"t":"move","p":"payload","pt":"msg","to":"csv","tot":"flow"}],"action":"","property":"","from":"","to":"","reg":false,"x":720,"y":380,"wires":[["866f5f89.dbd61"]]},{"id":"866f5f89.dbd61","type":"ui_dropdown","z":"453c408e.5a363","name":"Work center","label":"Work center","tooltip":"","place":"select","group":"f9e41b13.1fe7a8","order":1,"width":6,"height":1,"passthru":false,"multiple":false,"options":[{"label":"","value":"","type":"str"}],"payload":"","topic":"Work_Center","topicType":"str","x":790,"y":420,"wires":[["612687cc.7091d8","64227da5.45c0e4"]]},{"id":"612687cc.7091d8","type":"change","z":"453c408e.5a363","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"[$flowContext(\"csv\")[Work_Center = $$.payload]] ","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":900,"y":460,"wires":[["b4b4f062.abe9b","4f4f67bd.5a6f48"]]},{"id":"e4a27a07.f30178","type":"file in","z":"453c408e.5a363","name":"mt02order","filename":"C:\\Users\\Sahil\\Desktop\\testing\\mt02order.csv","format":"utf8","chunk":false,"sendError":false,"encoding":"none","x":550,"y":300,"wires":[["407f1a6a.5b5bc4"]]},{"id":"b4b4f062.abe9b","type":"change","z":"453c408e.5a363","name":"","rules":[{"t":"set","p":"options","pt":"msg","to":"[$distinct(payload.Order_No)]","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":1000,"y":500,"wires":[["58c5f212.4ddaac"]]},{"id":"58c5f212.4ddaac","type":"ui_dropdown","z":"453c408e.5a363","name":"Order No.","label":"Order No.","tooltip":"","place":"Select","group":"f9e41b13.1fe7a8","order":2,"width":7,"height":1,"passthru":false,"multiple":false,"options":[{"label":"","value":"","type":"str"}],"payload":"","topic":"Order_No","topicType":"msg","x":1100,"y":540,"wires":[["4ca1550c.20813c","d0bb29bc.fb95d8"]]},{"id":"c9de024b.950e2","type":"template","z":"453c408e.5a363","name":"simulate file - mt02order","field":"payload","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"Order_No,Work_Center,Material,Work_Center_Description,Cycle_TIme,Material_Description,Order_Qty,Confirm_Qty,Creation_date,Pending_Qty,Person_Responsible,Plant,Drg_No\n,,,,,,,,,,,,\n100070432,M02HD008,C-M-201-0696-01,HD008 HEADER,3,SHAFT SWING ARM UPTO COLD FORGING,750,750,08.06.2021,0,RAM SINGH,MT02,M-0696\n100070441,M02MBF01,C-M-201-3449-02,MBF1 MBF HARDENING & WASHING,1.67,BOLT SWING ARM PIVOT UPTO HT,\"3,000.00\",\"1,076.00\",08.06.2021,\"1,924.00\",PAWAN,MT02,M-3449\n100070296,M02MBF01,C-M-201-3449-02,MBF1 MBF HARDENING & WASHING,1.67,BOLT SWING ARM PIVOT UPTO HT,\"2,000.00\",\"2,000.00\",05.06.2021,0,PAWAN,MT02,M-3449\n100070441,M02ST003,C-M-201-3449-03,ST03 STRAIGHTENING,8,BOLT SWING ARM PIVOT UPTO STRAIGHTENING,\"3,000.00\",\"1,076.00\",08.06.2021,\"1,924.00\",AMIT SHARMA,MT02,M-3449\n100070296,M02ST003,C-M-201-3449-03,ST03 STRAIGHTENING,8,BOLT SWING ARM PIVOT UPTO STRAIGHTENING,\"2,000.00\",\"2,000.00\",05.06.2021,0,AMIT SHARMA,MT02,M-3449\n100070297,M02CL013,C-M-201-3449-04,CL13 CENTRE LESS GRINDER,7,BOLT SWING ARM PIVOT UPTO DIA HALF GRIND,\"2,000.00\",\"2,000.00\",05.06.2021,0,AMIT SHARMA,MT02,M-3449\n100070441,M02CL013,C-M-201-3449-04,CL13 CENTRE LESS GRINDER,7,BOLT SWING ARM PIVOT UPTO DIA HALF GRIND,\"3,000.00\",\"1,076.00\",08.06.2021,\"1,924.00\",AMIT SHARMA,MT02,M-3449\n100070297,M02CL013,C-M-201-3449-05,CL13 CENTRE LESS GRINDER,6,BOLT SWING ARM PIVOT UPTO DIA FINAL GRIN,\"2,000.00\",\"2,000.00\",05.06.2021,0,AMIT SHARMA,MT02,M-3449\n100070441,M02CL013,C-M-201-3449-05,CL13 CENTRE LESS GRINDER,6,BOLT SWING ARM PIVOT UPTO DIA FINAL GRIN,\"3,000.00\",\"1,076.00\",08.06.2021,\"1,924.00\",AMIT SHARMA,MT02,M-3449\n100070441,M02TR007,C-M-201-3449-06,TR07 THREAD ROLLING,7,BOLT SWING ARM PIVOT UPTO THREAD ROLLING,\"3,000.00\",\"1,076.00\",08.06.2021,\"1,924.00\",AMIT SHARMA,MT02,M-3449\n100070298,M02TR007,C-M-201-3449-06,TR07 THREAD ROLLING,7,BOLT SWING ARM PIVOT UPTO THREAD ROLLING,\"2,000.00\",\"2,000.00\",05.06.2021,0,AMIT SHARMA,MT02,M-3449\n100070356,M02SB001,C-M-219-0286-04,SB01 SHOT BLASTING,7.2,PINION KICK STARTER UPTO SHOT BLASTING,\"15,911.00\",\"4,420.00\",07.06.2021,\"11,491.00\",UDAY THAKUR,MT02,M-0286\n100070512,M02SB001,C-M-219-0286-04,SB01 SHOT BLASTING,7.2,PINION KICK STARTER UPTO SHOT BLASTING,\"29,975.00\",\"1,600.00\",10.06.2021,\"28,375.00\",UDAY THAKUR,MT02,M-0286\n100070356,M02PH001,C-M-219-0286-05,PT PHOSPHATING TANKS,2,PINION KICK STARTER UPTO ZINK PH. & SOAP,\"31,861.00\",\"6,020.00\",07.06.2021,\"25,841.00\",UDAY THAKUR,MT02,M-0286\n100070356,M02KP003,C-M-219-0286-06,KP03 COLD FORGING,8,PINION KICK STARTER UPTO RT.COLD FORGING,\"31,861.00\",\"6,020.00\",07.06.2021,\"25,841.00\",UDAY THAKUR,MT02,M-0286\n100070420,M02CN001,C-M-219-0286-07,CNC01 TURNING CENTRE,55,PINION KICK STARTER UPTO CNC TURNING 1ST,\"12,501.00\",\"1,472.00\",08.06.2021,\"11,029.00\",ASHOK THAKUR,MT02,M-0286\n100070420,M02CN002,C-M-219-0286-07,CNC02 TURNING CENTRE,55,PINION KICK STARTER UPTO CNC TURNING 1ST,\"10,000.00\",\"1,611.00\",08.06.2021,\"8,389.00\",ASHOK THAKUR,MT02,M-0286\n100070420,M02CN005,C-M-219-0286-07,CNC05 TURNING CENTRE,65,PINION KICK STARTER UPTO CNC TURNING 1ST,\"5,000.00\",\"1,393.00\",08.06.2021,\"3,607.00\",ASHOK THAKUR,MT02,M-0286\n100070420,M02CN006,C-M-219-0286-07,CNC06 TURNING CENTRE,65,PINION KICK STARTER UPTO CNC TURNING 1ST,\"5,000.00\",\"1,599.00\",08.06.2021,\"3,401.00\",ASHOK THAKUR,MT02,M-0286\n100070420,M02CN003,C-M-219-0286-08,CNC03 TURNING CENTRE,60,PINION KICK STARTER UPTO CNC TURNING 2ND,\"12,862.00\",\"1,402.00\",08.06.2021,\"11,460.00\",ASHOK THAKUR,MT02,M-0286\n100070420,M02CN004,C-M-219-0286-08,CNC04 TURNING CENTRE,60,PINION KICK STARTER UPTO CNC TURNING 2ND,\"10,000.00\",\"1,661.00\",08.06.2021,\"8,339.00\",ASHOK THAKUR,MT02,M-0286\n100070420,M02CN007,C-M-219-0286-08,CNC07 TURNING CENTRE,60,PINION KICK STARTER UPTO CNC TURNING 2ND,\"5,000.00\",\"1,671.00\",08.06.2021,\"3,329.00\",ASHOK THAKUR,MT02,M-0286\n100070420,M02CN008,C-M-219-0286-08,CNC08 TURNING CENTRE,60,PINION KICK STARTER UPTO CNC TURNING 2ND,\"5,000.00\",\"1,336.00\",08.06.2021,\"3,664.00\",ASHOK THAKUR,MT02,M-0286\n100070420,M02HB004,C-M-219-0286-09,M02HB004-HOBBING,25,PINION KICK STARTER UPTO GEAR CUTTING,\"33,817.00\",\"5,450.00\",08.06.2021,\"28,367.00\",RAJA BABU,MT02,M-0286\n100070374,M02GCF02,C-M-219-0286-10,GCF02 GAS CARBURISING FURNACE,14,PINION KICK STARTER UPTO HT,\"3,500.00\",\"3,200.00\",07.06.2021,300,PAWAN,MT02,M-0286\n100070319,M02SB002,C-M-219-0286-11,SB02 SHOT BLASTING,2,PINION KICK STARTER UPTO SHOT BLASTING,\"35,001.00\",\"4,691.00\",05.06.2021,\"30,310.00\",UDAY THAKUR,MT02,M-0286","output":"str","x":590,"y":260,"wires":[[]]},{"id":"4f4f67bd.5a6f48","type":"ui_table","z":"453c408e.5a363","group":"f9e41b13.1fe7a8","name":"","order":5,"width":24,"height":3,"columns":[],"outputs":0,"cts":false,"x":1170,"y":280,"wires":[]},{"id":"d1c0df0e.eb48f","type":"ui_button","z":"453c408e.5a363","name":"Fetch Order No.","group":"162e61a9.5d8dee","order":3,"width":3,"height":1,"passthru":false,"label":"Fetch Order No.","tooltip":"","color":"","bgcolor":"","icon":"","payload":"","payloadType":"date","topic":"fetchorderno","topicType":"msg","x":340,"y":300,"wires":[["e4a27a07.f30178"]]},{"id":"33c022c6.0cbefe","type":"link in","z":"453c408e.5a363","name":"","links":["20b699b3.0c4866"],"x":675,"y":480,"wires":[["866f5f89.dbd61"]]},{"id":"fad78231.b3466","type":"link in","z":"453c408e.5a363","name":"","links":["20b699b3.0c4866"],"x":975,"y":560,"wires":[["58c5f212.4ddaac"]]},{"id":"4ca1550c.20813c","type":"link out","z":"453c408e.5a363","name":"","links":["bbb59193.27b94"],"x":1215,"y":480,"wires":[]},{"id":"64227da5.45c0e4","type":"link out","z":"453c408e.5a363","name":"","links":["bbb59193.27b94"],"x":915,"y":400,"wires":[]},{"id":"5f74164c.d57e48","type":"link in","z":"453c408e.5a363","name":"","links":["20b699b3.0c4866"],"x":1135,"y":380,"wires":[["4f4f67bd.5a6f48"]]},{"id":"e87bbb54.9ec938","type":"csv","z":"453c408e.5a363","name":"","sep":",","hdrin":true,"hdrout":"all","multi":"one","ret":"\\n","temp":"","skip":"0","strings":true,"include_empty_strings":"","include_null_values":"","x":1630,"y":640,"wires":[["b055a772.eaf5a8","5fe033d2.7faaac","64265b7.67d13a4"]]},{"id":"5fe033d2.7faaac","type":"debug","z":"453c408e.5a363","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":1810,"y":600,"wires":[]},{"id":"4a35e5fc.12375c","type":"link in","z":"453c408e.5a363","name":"","links":["ae21f21d.2c7cf"],"x":505,"y":1220,"wires":[["9740e705.9336b8"]]},{"id":"9740e705.9336b8","type":"delay","z":"453c408e.5a363","name":"","pauseType":"delay","timeout":"2","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":610,"y":1220,"wires":[["11ce6c04.e48dd4"]]},{"id":"64265b7.67d13a4","type":"ui_toast","z":"453c408e.5a363","position":"top right","displayTime":"3","highlight":"","sendall":false,"outputs":0,"ok":"OK","cancel":"","raw":true,"topic":"","name":"","x":1890,"y":640,"wires":[]},{"id":"a5da386a.0c0a78","type":"function","z":"453c408e.5a363","name":"date","func":"var d = new Date(msg.payload);\nvar day = d.getDate();\nvar month = d.getMonth();\nvar monthformat = month + 1;\nvar year = d.getFullYear();\nmsg.payload = day +\"-\"+ monthformat +\"-\"+ year;\nmsg.topic = 'Posting_date';\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":510,"y":120,"wires":[["2c4436c6.2f30ba","1a2367da.967f48"]]},{"id":"ab073e11.935d1","type":"ui_media","z":"453c408e.5a363","group":"162e61a9.5d8dee","name":"","width":1,"height":1,"order":1,"category":"logo","file":"logo transparent.png","layout":"adjust","showcontrols":false,"loop":false,"onstart":false,"scope":"local","tooltip":"","x":210,"y":120,"wires":[[]]},{"id":"d0bb29bc.fb95d8","type":"debug","z":"453c408e.5a363","name":"","active":true,"tosidebar":true,"console":false,"tostatus":true,"complete":"payload","targetType":"msg","statusVal":"payload","statusType":"auto","x":1290,"y":540,"wires":[]},{"id":"bd602405.bccc98","type":"csv","z":"453c408e.5a363","name":"","sep":",","hdrin":true,"hdrout":"none","multi":"mult","ret":"\\n","temp":"","skip":"0","strings":true,"include_empty_strings":"","include_null_values":"","x":410,"y":1080,"wires":[["5c835b0.96b11a4"]]},{"id":"5c835b0.96b11a4","type":"change","z":"453c408e.5a363","name":"","rules":[{"t":"set","p":"options","pt":"msg","to":"$distinct(payload.Breakdown_reason)","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":500,"y":1120,"wires":[["49117b6f.630c24"]]},{"id":"8efa1e6d.15ad","type":"template","z":"453c408e.5a363","name":"simulate file - breakdown reason","field":"payload","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"Breakdown_reason\nWarming up time\nNo raw material\nInsert change or adjustment\nMachine accident\nTool not available\nNo operator\nInspection time\nMachine cleaning\nPreventive maintenance\nNew part development\nLate start early stoppage\nLoad unload\nSpindle off time\nAxis off time\nMachine off time\nRework\nSetup\nMaintenance\nExcess load unload\nMachine breakdown\nSchedule closure\nSmall stop losses\nPlanned idle time\nReason unknown\nNo data","output":"str","x":270,"y":1040,"wires":[["bd602405.bccc98"]]},{"id":"6f66442a.45768c","type":"file in","z":"453c408e.5a363","name":"Breakdown reasons","filename":"C:\\Users\\Sahil\\Desktop\\testing\\breakdown_reasons.csv","format":"utf8","chunk":false,"sendError":false,"encoding":"none","x":200,"y":1080,"wires":[[]]},{"id":"3d292329.c239fc","type":"inject","z":"453c408e.5a363","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":true,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":150,"y":1000,"wires":[["8efa1e6d.15ad"]]},{"id":"75eb5266.16babc","type":"group","z":"453c408e.5a363","style":{"stroke":"#999999","stroke-opacity":"1","fill":"none","fill-opacity":"1","label":true,"label-position":"nw","color":"#a4a4a4"},"nodes":["a392121d.3c04a","152ea6c7.144a99","dea72cd0.58df7"],"x":494,"y":559,"w":382,"h":122},{"id":"a392121d.3c04a","type":"ui_template","z":"453c408e.5a363","g":"75eb5266.16babc","group":"dce9e7a2.d20c78","name":"HEAD scripts and css","order":6,"width":0,"height":0,"format":"\n<script type=\"text/javascript\" src=\"https://cdn.jsdelivr.net/momentjs/latest/moment.min.js\"></script>\n<script type=\"text/javascript\" src=\"https://cdn.jsdelivr.net/npm/daterangepicker/daterangepicker.min.js\"></script>\n<link rel=\"stylesheet\" type=\"text/css\" href=\"https://cdn.jsdelivr.net/npm/daterangepicker/daterangepicker.css\" />","storeOutMessages":true,"fwdInMessages":true,"resendOnRefresh":true,"templateScope":"global","x":620,"y":600,"wires":[[]]},{"id":"152ea6c7.144a99","type":"ui_template","z":"453c408e.5a363","g":"75eb5266.16babc","group":"f9e41b13.1fe7a8","name":"","order":6,"width":8,"height":1,"format":"\n<input type=\"text\" id=\"daterange1\" />\n\n<script>\n \n const scope = this.scope;\n $('#daterange1').daterangepicker({\n timePicker: true,\n locale: {\n format: 'YYYY-MM-DD hh:mm A'\n }\n });\n $('#daterange1').on('apply.daterangepicker', function(ev, picker) {\n let payload = {};\n payload.startDate = picker.startDate.format('YYYY-MM-DD');\n payload.endDate = picker.endDate.format('YYYY-MM-DD');\n payload.startTime = picker.startDate.format('HH:mm:ss');\n payload.endTime = picker.endDate.format('HH:mm:ss');\n scope.send({payload:payload});\n });\n\n</script>\n","storeOutMessages":true,"fwdInMessages":true,"resendOnRefresh":true,"templateScope":"local","x":590,"y":640,"wires":[["dea72cd0.58df7"]]},{"id":"dea72cd0.58df7","type":"debug","z":"453c408e.5a363","g":"75eb5266.16babc","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":760,"y":640,"wires":[]},{"id":"dce9e7a2.d20c78","type":"ui_group","name":"Object detection","tab":"5132060d.4cde48","order":1,"disp":true,"width":"9","collapse":false},{"id":"5132060d.4cde48","type":"ui_tab","name":"Home","icon":"dashboard","disabled":false,"hidden":false},{"id":"162e61a9.5d8dee","type":"ui_group","name":"Heading","tab":"74fd02f9.b99b3c","order":1,"disp":false,"width":"24","collapse":false},{"id":"f9e41b13.1fe7a8","type":"ui_group","name":"form","tab":"74fd02f9.b99b3c","order":3,"disp":false,"width":"24","collapse":false},{"id":"5179bc3b.985dd4","type":"ui_group","name":"Entry Confirmation","tab":"74fd02f9.b99b3c","order":4,"disp":true,"width":24,"collapse":false},{"id":"74fd02f9.b99b3c","type":"ui_tab","name":"Breakdown entry form","icon":"dashboard","order":1,"disabled":false,"hidden":false}]
As I said, it works for me...
does the broswer have internet connection (this solution uses online CDNs)
Try refreshing your browser
I refreshed and still not working . Is there a way to make an offline version for this .
I also found a discussion related to date range.
I'll try to put more efforts and work something out & hope to learn something out of it.
And if I fail I'll ask your help.
What browser are you using?
Can you check devtools console log for errors?
Google Chrome Version 91.0.4472.114
It's working now . Also, below is the screenshot.
Also, when you asked about internet, where I'm going to use this is a manufacturing unit and Internet connection is not always stable. So I should seek more robust solution.
To make this work without an internet connection you will need download the files that the CDNs deliver and make them available in your dashboard.
You can do this with http endpoints. Check the node-red cookbook.
Can it work like this
I downloaded the code from GitHub and extracted them in D: drive.
Then I edited the scripts links from
No, you can't (or rather shouldn't) use file paths.
There are a few ways to do this.
Put the code into something like a template node or load it via a file node.
Serve them via HTTP in and HTTP out nodes.
https://cookbook.nodered.org/#http-endpoints
https://cookbook.nodered.org/http/serve-a-local-file
Modify settings.js to serve static files. Put the files in the static folder. Point your scripts at the node-red URL and your static path.
From the docs...
httpStatic
a local directory from which to serve static web content from. This content is served from the top level url, /. When this property is used, httpAdminRoot must also be used to make editor UI available at a path other than /.
Hi @Steve-Mcl thank you for this exemple i test it work succesfully
but only when i refrech the page
this is the code which i am using
[{"id":"5bd26d79.acf4a4","type":"debug","z":"ee2cde41.7beb8","g":"e60eee13.69cbc","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":1110,"y":2100,"wires":[]},{"id":"8bc666af.4738c8","type":"ui_template","z":"ee2cde41.7beb8","g":"e60eee13.69cbc","group":"12c707c0.2c51a8","name":"","order":2,"width":"0","height":"0","format":"\n\n<input type=\"text\" name=\"datetimes\" />\n\n<script>\n//$(function() {})\nconst scope = this.scope; \n\n \n $('input[name=\"datetimes\"]').daterangepicker({\n timePicker: true,\n startDate: moment().startOf('hour'),\n endDate: moment().startOf('hour').add(48, 'hour'),\n locale: {\n format: 'DD-MM-YYYY hh:mm A'\n }\n });\n \n \n \n \n \n \n \n $('input[name=\"datetimes\"]').on('apply.daterangepicker', function(ev, picker) {\n let payload = {};\n payload.event=\"\"\n payload.startDate = picker.startDate.format('DD-MM-YYYY');\n payload.endDate = picker.endDate.format('DD-MM-YYYY');\n payload.startTime = picker.startDate.format('HH:mm:ss');\n payload.endTime = picker.endDate.format('HH:mm:ss');\n scope.send({payload:payload});\n });\n \n</script>\n\n","storeOutMessages":true,"fwdInMessages":true,"resendOnRefresh":true,"templateScope":"local","x":1020,"y":2040,"wires":[["5b08a246.fa5f4c","5bd26d79.acf4a4"]]},{"id":"bce437bc.4308c8","type":"ui_template","z":"ee2cde41.7beb8","g":"e60eee13.69cbc","group":"fa3b3557.5a2a08","name":"HEAD scripts and css","order":6,"width":0,"height":0,"format":"\n<script type=\"text/javascript\" src=\"https://cdn.jsdelivr.net/momentjs/latest/moment.min.js\"></script>\n<script type=\"text/javascript\" src=\"https://cdn.jsdelivr.net/npm/daterangepicker/daterangepicker.min.js\"></script>\n<link rel=\"stylesheet\" type=\"text/css\" href=\"https://cdn.jsdelivr.net/npm/daterangepicker/daterangepicker.css\" />","storeOutMessages":true,"fwdInMessages":true,"resendOnRefresh":true,"templateScope":"global","x":1360,"y":2000,"wires":[[]]},{"id":"12c707c0.2c51a8","type":"ui_group","name":"Object detection","tab":"5132060d.4cde48","order":1,"disp":true,"width":"14","collapse":false},{"id":"fa3b3557.5a2a08","type":"ui_group","name":"Object detection","tab":"5132060d.4cde48","order":1,"disp":true,"width":"9","collapse":false},{"id":"5132060d.4cde48","type":"ui_tab","name":"conge","icon":"dashboard","order":1,"disabled":false,"hidden":false}]
@Steve-Mcl could you explaine the cause of this problem thank you
This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.