Make the datepicker input editable


#3

Thank you sematik
it work fine


#4

please, what can I do to keeps the current date by default, in my input ?
Thank you.


#5

Set value property of datepicker control to Date() object, see snippet:
https://snippet.dhtmlx.com/7sc6hsgu


#6

Thank you very much proldapru


#7

Please another asking of help,
I want to attach Form in the dhxWindow, this below is my code, but it never work.

var dhxWindow = new dhx.Window({
title: “Configuration des mails planifiés”,
modal: true,
resizable: true,
//css:“planmail”,
header: true
});
dhxWindow.attach(“Form”,plform);
var plform = new dhx.Form(“adressemailcontainer”, {
cols: [
{
type: “textarea”,
value: “Some nice text”,
placeholder: “i am textarea”,
width:“200px”,
height: “150px”
},
{
type: “button”,
value: “ENREGISTRER”,
size: “medium”,
view: “flat”
}
]
});

What is wrong in my code ?, can you help me please.


#8

First create Form in null container, then create Window and attach Form to it. See snippet:
https://snippet.dhtmlx.com/kjfpxhdc


#9

Thank you proldapru.


#10

Hi proldapru,
I’m coming to ask for a little bit of your precious time, for another problem.
I want to know how can initialyse the textarea of my form with data from a json file.

This is what I do, but its not work.

plform = new dhx.Form(“null”, {
rows: [
{
type: “textarea”,
value: “includes/bruno.json”,
width:“900px”,
height: “250px”
},
{
type: “button”,
value: “ENREGISTRER”,
size: “medium”,
view: “flat”
}
]
});

Thank you


#11

Unfortunately such complex content is not supported.
You may try to perform the ajax request, and insert the the response in the value of your textarea


#12

It is a small content, 60 caracters only . I want to do it with json file, can you help me completing my following code

plform = new dhx.Form(“null”, {
rows: [
{
type: “textarea”,
value: “includes/bruno.json”,
width:“900px”,
height: “250px”
},
{
type: “button”,
value: “ENREGISTRER”,
size: “medium”,
view: “flat”
}
]
});


#13

I try to perform the ajax request, but in the textarea field the message [object Promise] is display.

plform = new dhx.Form(“null”, {
rows: [
{
type: “textarea”,
value: dhx.ajax.get(“PHPMailer/email.json”),
name:“destinataires”,
width:“900px”,
height: “250px”
},
{
type: “button”,
value: “ENREGISTRER”,
size: “medium”,
view: “flat”
}
]
});


#14
dhx.ajax.get("PHPMailer/email.json").then(function (data) {
plform = new dhx.Form(“null”, {
rows: [
{
type: “textarea”,
value:data ,
name:“destinataires”,
width:“900px”,
height: “250px”
},
{
type: “button”,
value: “ENREGISTRER”,
size: “medium”,
view: “flat”
}
]
});
});

#15

Hi sematik
Your code indicates an error in this place plform = new dhx.Form(“null”, {
.
I have already searched everywhere, but without success.

Error message : Uncaught SyntaxError: Unexpected token ‘.’


#16

Try null without any quotation marks:
let plform = new dhx.Form(null, { ... });

null in this case is a JavaScript object.


#17

I remove the quotation marks in null, but the error still persit

Uncaught SyntaxError: Unexpected token ‘.’


#18

I think, you have to replace all nonstandard quotes ( “ ) in your code to standard double (") or single (’) quotes. Maybe software of this forum distorts quotes.


#19

It is what I do at the first time.

the error indicate the error in the following code

plform = new dhx.Form(null, {


#20

@futuredba: Unfortunately, I could not execute dhx.ajax in the snippet tool, so I attach an archive with two demo files: demo.zip (250.2 KB). Everything works as expected.

@sematik: Is it possible to make dhx.ajax in the snippet tool?


#21

Thank you proldapru, It work fine.

Thank you.


#22

Please I need your help proldapru.