cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Discussions

Solve problems, and share tips and tricks with other JMP users.
%3CLINGO-SUB%20id%3D%22lingo-sub-216467%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3EF%C3%BCgen%20Sie%20ein%20neues%20Fenster%20f%C3%BCr%20das%20Datumsauswahlfeld%2FDatumseingabefeld%20f%C3%BCr%20den%20Start-%20und%20Endkalender%20hinzu%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-216467%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3EHallo%20JMP-Community%2C%20ich%20verwende%20normalerweise%20JMP%20Preselected%20und%20Plot-Diagramme.%20Ich%20ben%C3%B6tige%20Hilfe%2C%20um%20die%20Auswahldatums%C3%A4nderung%20f%C3%BCr%20mein%20Skript%20unten%20hinzuzuf%C3%BCgen.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EWie%20unten%20beschrieben%2C%20muss%20ich%2C%20sobald%20ich%20die%20Datenbank%20aufrufe%2C%20die%20Daten%20f%C3%BCr%20Start%20und%20Ende%20%C3%A4ndern%2C%20um%20die%20ben%C3%B6tigten%20Daten%20zu%20den%20Eingabedaten%20abzufragen.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3Edt%20%3D%20Open%20Database(%0A%20%22DSN%3Dxxx%20%3BDescription%3Dyyy%3BUID%3Dzzz%3BPWD%3Dzzz%3BAPP%3DJMP%3BDATABASE%3DMATS%3B%22%2C%0A%20%22SELECT%20pen_parametric.pn_id%2C%20pen_parametric.equiplk_ky%2C%20parametric_dlk.paramlk_ky%2C%0AFROM%20MATS.parametric_dlk%20parametric_dlk%2C%20MATS.pen_parametric%20pen_parametric%0AWHERE%20parametric_dlk.paramlk_ky%20%3D%20parametric_ref_llk.paramlk_ky%20AND%20parametric_dlk.paramlk_ky%20%3D%20pen_parametric.paramlk_ky%20AND%20((pen_parametric.part_dm%20Between%20%7Bts%20'2019-07-01%2000%3A00%3A00'%7D%20And%20%7Bts%20'2019-07-02%2000%3A00%3A00'%7D))%22%0A)%3B%0A%0Adt%20%26lt%3B%26lt%3B%20Set%20Name(%20%22Data01%22%20)%3B%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ESo%20f%C3%BCr%3CSTRONG%3E%20(Zwischen%20%7Bts%20'%3CFONT%20color%3D%22%230000FF%22%3E%3CEM%3E%2001.07.2019%2000%3A00%3A00%3C%2FEM%3E%3C%2FFONT%3E%20'%7D%20Und%20%7Bts%20'%3CFONT%20color%3D%22%2399CC00%22%3E%3CEM%3E%202019-07-02%2000%3A00%3A00%3C%2FEM%3E%3C%2FFONT%3E%20'%7D)%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3EIst%20es%20m%C3%B6glich%2C%20ein%20Skriptfeld%20hinzuzuf%C3%BCgen%2C%20das%20ein%20neues%20Kalenderfenster%20zur%20Auswahl%20des%20Kalenders%20gem%C3%A4%C3%9F%20dem%20oben%20formatierten%20Datum%20auffordert%2C%20sodass%20ich%20das%20Datum%20durch%20das%20von%20mir%20gew%C3%BCnschte%2Fausgew%C3%A4hlte%20Datum%20ersetzen%20und%20dann%20das%20Skript%20ausf%C3%BChren%20kann%3F%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EVielen%20Dank%20im%20Voraus!%3C%2FP%3E%0A%3CP%3EBR%2C%20Otis%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-216986%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3EBetreff%3A%20F%C3%BCgen%20Sie%20ein%20neues%20Fenster%20f%C3%BCr%20das%20Datumsauswahlfeld%2FDatumseingabefeld%20f%C3%BCr%20den%20Start-%20und%20Endkalender%20hinzu%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-216986%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3EDan%2C%3CA%20href%3D%22https%3A%2F%2Fcommunity.jmp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F4587%22%20target%3D%22_blank%22%3E%20%40danschikore%3C%2FA%3E%20%2C%20Danke.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EMir%20gef%C3%A4llt%20auch%20die%20datumsformatierte%20NumberEditBox().%20Ich%20wollte%20ein%20alternatives%20Skript%20ver%C3%B6ffentlichen%2C%20das%20den%20unten%20gezeigten%20Dialog%20erzeugt.%20Allerdings%20dachte%20ich%3CA%20href%3D%22https%3A%2F%2Fcommunity.jmp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F15309%22%20target%3D%22_blank%22%3E%20%40OtisZeca%3C%2FA%3E%20k%C3%B6nnte%20neu%20bei%20JSL%20sein.Zu%20den%20sehr%20n%C3%BCtzlichen%20Optionen%20von%20NumberEditbox()%20geh%C3%B6ren%20das%20Festlegen%20eines%20Minimums%2C%20eines%20Maximums%20und%20die%20Angabe%20nur%20einer%20Ganzzahl.Das%20angeh%C3%A4ngte%20Skript%20verwendet%20eine%20Funktion%2C%20um%20ein%20begrenztes%20Bearbeitungsfeld%20f%C3%BCr%20Ganzzahlen%20zu%20erstellen%2C%20das%20den%20Wert%20an%20eine%20vom%20Benutzer%20angegebene%20Variable%20zur%C3%BCckgibt%2C%20die%20f%C3%BCr%20nicht-modale%20Dialoge%20g%C3%BCltig%20ist.%20Ich%20poste%20es%20f%C3%BCr%20den%20Blog%2C%20da%20ich%20wei%C3%9F%2C%20dass%20Sie%20kein%20Beispiel%20brauchen.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22image.png%22%20style%3D%22width%3A%20612px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22image.png%22%20style%3D%22width%3A%20612px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22image.png%22%20style%3D%22width%3A%20612px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.jmp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F18271iA02BC9F1B69317FD%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22image.png%22%20alt%3D%22image.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-216890%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3EBetreff%3A%20F%C3%BCgen%20Sie%20ein%20neues%20Fenster%20f%C3%BCr%20das%20Datumsauswahlfeld%2FDatumseingabefeld%20f%C3%BCr%20den%20Start-%20und%20Endkalender%20hinzu%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-216890%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3EHier%20ist%20eine%20modifizierte%20Version%20von%20Georgias%20Skript%2C%20die%20das%20Zahlenbearbeitungsfeld%20verwendet%2C%20anstatt%20direkt%20das%20Kalenderfeld%20zu%20verwenden.Das%20Zahlenbearbeitungsfeld%20verf%C3%BCgt%20%C3%BCber%20eine%20Popup-Version%20des%20integrierten%20Kalenders%2C%20wenn%20das%20numerische%20Format%20auf%20ein%20Datum%20eingestellt%20ist.Ich%20habe%20das%20Format%20so%20eingestellt%2C%20dass%20es%20nur%20den%20Tag%20einschlie%C3%9Ft%2C%20Sie%20k%C3%B6nnen%20aber%20auch%20die%20Tageszeit%20einbeziehen%2C%20wenn%20Sie%20diese%20Granularit%C3%A4tsebene%20ben%C3%B6tigen.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-center%22%20image-alt%3D%22NumEditCalendar.png%22%20style%3D%22width%3A%20309px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22NumEditCalendar.png%22%20style%3D%22width%3A%20309px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22NumEditCalendar.png%22%20style%3D%22width%3A%20309px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.jmp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F18268i834A3461698D653E%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22NumEditCalendar.png%22%20alt%3D%22NumEditCalendar.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3ENames%20Default%20To%20Here(%201%20)%3B%0A%0Atmpstr%20%3D%0A%22SELECT%20pen_parametric.pn_id%2C%20pen_parametric.equiplk_ky%2C%20parametric_dlk.paramlk_ky%2C%0AFROM%20MATS.parametric_dlk%20parametric_dlk%2C%20MATS.pen_parametric%20pen_parametric%0AWHERE%20parametric_dlk.paramlk_ky%20%3D%20parametric_ref_llk.paramlk_ky%20%0A%20%20AND%20parametric_dlk.paramlk_ky%20%3D%20pen_parametric.paramlk_ky%20%0A%20%20%20AND%20((pen_parametric.part_dm%20Between%20%7Bts%20'%5Esdt%5E'%7D%20And%20%7Bts%20'%5Eedt%5E'%7D))%22%3B%0A%0ANew%20Window(%20%22Query%20Date%22%2C%0A%20%26lt%3B%3CMODAL%3E%3C%2FMODAL%3E%3C%2FCODE%3E%3C%2FPRE%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-216850%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3EBetreff%3A%20F%C3%BCgen%20Sie%20ein%20neues%20Fenster%20f%C3%BCr%20das%20Datumsauswahlfeld%2FDatumseingabefeld%20f%C3%BCr%20den%20Start-%20und%20Endkalender%20hinzu%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-216850%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3EAhh%20icic..%20Danke%20f%C3%BCr%20deine%20Hilfe!%3C%2FP%3E%3CP%3EIch%20brauche%20mehr%20%C3%9Cbung%2C%20um%20zu%20verstehen%2C%20was%20Sie%20geschrieben%20haben.%20Danke!%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-216479%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3EBetreff%3A%20F%C3%BCgen%20Sie%20ein%20neues%20Fenster%20f%C3%BCr%20das%20Datumsauswahlfeld%2FDatumseingabefeld%20f%C3%BCr%20den%20Start-%20und%20Endkalender%20hinzu%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-216479%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fcommunity.jmp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F15309%22%20target%3D%22_blank%22%3E%40OtisZeca%3C%2FA%3E%20%2C%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EDaf%C3%BCr%20gibt%20es%20mehrere%20Methoden.%20Hier%20ist%20ein%20Beispiel%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22image.png%22%20style%3D%22width%3A%20663px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22image.png%22%20style%3D%22width%3A%20663px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22image.png%22%20style%3D%22width%3A%20663px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.jmp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F18199iA9E30F992F39B5C9%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22image.png%22%20alt%3D%22image.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3ENames%20Default%20To%20Here(%201%20)%3B%0A%0Atmpstr%20%3D%20%22SELECT%20pen_parametric.pn_id%2C%20pen_parametric.equiplk_ky%2C%20parametric_dlk.paramlk_ky%2C%0AFROM%20MATS.parametric_dlk%20parametric_dlk%2C%20MATS.pen_parametric%20pen_parametric%0AWHERE%20parametric_dlk.paramlk_ky%20%3D%20parametric_ref_llk.paramlk_ky%20%0A%20%20AND%20parametric_dlk.paramlk_ky%20%3D%20pen_parametric.paramlk_ky%20%0A%20%20%20AND%20((pen_parametric.part_dm%20Between%20%7Bts%20'%5Esdt%5E'%7D%20And%20%7Bts%20'%5Eedt%5E'%7D))%22%0A%3B%0A%0ANew%20Window(%20%22Query%20Date%22%2C%20%26lt%3B%3CMODAL%3E%3C%2FMODAL%3E%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E
Choose Language Hide Translation Bar
OtisZeca
Level I

Add a new window for Start & End Calendar date selection box/ date entry box

Hi JMP community, I usually use jmp preselected and plot graphs need a help to add selection date amend for my script below.

 

As per below, once I call out database, I have to amend the dates for start & end in order to query needed data on input dates.

 

dt = Open Database(
	"DSN=xxx ;Description=yyy;UID=zzz;PWD=zzz;APP=JMP;DATABASE=MATS;",
	"SELECT pen_parametric.pn_id, pen_parametric.equiplk_ky, parametric_dlk.paramlk_ky,
FROM MATS.parametric_dlk parametric_dlk, MATS.pen_parametric pen_parametric
WHERE parametric_dlk.paramlk_ky = parametric_ref_llk.paramlk_ky AND parametric_dlk.paramlk_ky = pen_parametric.paramlk_ky AND ((pen_parametric.part_dm Between {ts '2019-07-01 00:00:00'} And {ts '2019-07-02 00:00:00'}))"
);

dt << Set Name( "Data01" );

 

So, for (Between {ts '2019-07-01 00:00:00'} And {ts '2019-07-02 00:00:00'})

Is it possible for adding a script box that prompt up new window calendar box for selection of the calendar as per formatted date above so can replace the date to the ones i want/select and then run the script?

 

Thank you in advance!

BR, Otis

2 ACCEPTED SOLUTIONS

Accepted Solutions
gzmorgan0
Super User (Alumni)

Re: Add a new window for Start & End Calendar date selection box/ date entry box

@OtisZeca,

 

There are multiple methods to do this. Here is one example 

 

image.png

Names Default To Here( 1 );

tmpstr = "SELECT pen_parametric.pn_id, pen_parametric.equiplk_ky, parametric_dlk.paramlk_ky,
FROM MATS.parametric_dlk parametric_dlk, MATS.pen_parametric pen_parametric
WHERE parametric_dlk.paramlk_ky = parametric_ref_llk.paramlk_ky 
  AND parametric_dlk.paramlk_ky = pen_parametric.paramlk_ky 
   AND ((pen_parametric.part_dm Between {ts '^sdt^'} And {ts '^edt^'}))"
;

New Window( "Query Date", <<Modal,

sd=Today();
ed=Today();
 HListBox(
    PanelBox( "From Time",
      scal = Calendar Box(, SetFunction(Function({this}, sd=scal<< Get Date) ))
    ),
    spacerbox(Size(20,20)),
    PanelBox( "To Time",
    ecal = Calendar Box(, SetFunction(Function({this}, ed=ecal<< Get Date) ))
    )
));

sdt = Munger(Format Date(sd, "yyyy-mm-ddThh:mm:ss"), 1, "T", " "); 
edt = Munger(Format Date(ed, "yyyy-mm-ddThh:mm:ss"), 1, "T", " "); 


show(sdt, edt);
 
qstring = EvalInsert(tmpstr);
show(qstring);  //see log

//then run the line below
//dt = Open Database("DSN=xxx ;Description=yyy;UID=zzz;PWD=zzz;APP=JMP;DATABASE=MATS;", qstring);

 

View solution in original post

Re: Add a new window for Start & End Calendar date selection box/ date entry box

Here's a modified version of Georgia's script that uses Number Edit Box instead of directly using the Calendar Box.  Number Edit Box has a popup version of the calendar build-in if the numeric format is set to a date.  I set the format to only include the day, but you can include time-of-day as well if you need that level of granularity.

 

NumEditCalendar.png

 

Names Default To Here( 1 );

tmpstr =
"SELECT pen_parametric.pn_id, pen_parametric.equiplk_ky, parametric_dlk.paramlk_ky,
FROM MATS.parametric_dlk parametric_dlk, MATS.pen_parametric pen_parametric
WHERE parametric_dlk.paramlk_ky = parametric_ref_llk.paramlk_ky 
  AND parametric_dlk.paramlk_ky = pen_parametric.paramlk_ky 
   AND ((pen_parametric.part_dm Between {ts '^sdt^'} And {ts '^edt^'}))";

New Window( "Query Date",
	<<Modal, 
	sd = Today();
	ed = Today();
	H List Box(
		Text Box( "From:" ),
		scal = Number Edit Box( sd, <<Set Format( Format( "yyyy-mm-dd" ) ), <<SetFunction( Function( {this}, sd = scal << Get ) ), <<Set Show Spin Box(1) ),
		Spacer Box( Size( 20, 20 ) ),
		Text Box( "To:" ),
		ecal = Number Edit Box( ed, <<Set Format( Format( "yyyy-mm-dd" ) ), <<SetFunction( Function( {this}, ed = ecal << Get ) ), <<Set Show Spin Box(1) ),
	);
);

sdt = Munger( Format Date( sd, "yyyy-mm-ddThh:mm:ss" ), 1, "T", " " );
edt = Munger( Format Date( ed, "yyyy-mm-ddThh:mm:ss" ), 1, "T", " " ); 


Show( sdt, edt );
 
qstring = Eval Insert( tmpstr );
Show( qstring );  //see log

View solution in original post

4 REPLIES 4
gzmorgan0
Super User (Alumni)

Re: Add a new window for Start & End Calendar date selection box/ date entry box

@OtisZeca,

 

There are multiple methods to do this. Here is one example 

 

image.png

Names Default To Here( 1 );

tmpstr = "SELECT pen_parametric.pn_id, pen_parametric.equiplk_ky, parametric_dlk.paramlk_ky,
FROM MATS.parametric_dlk parametric_dlk, MATS.pen_parametric pen_parametric
WHERE parametric_dlk.paramlk_ky = parametric_ref_llk.paramlk_ky 
  AND parametric_dlk.paramlk_ky = pen_parametric.paramlk_ky 
   AND ((pen_parametric.part_dm Between {ts '^sdt^'} And {ts '^edt^'}))"
;

New Window( "Query Date", <<Modal,

sd=Today();
ed=Today();
 HListBox(
    PanelBox( "From Time",
      scal = Calendar Box(, SetFunction(Function({this}, sd=scal<< Get Date) ))
    ),
    spacerbox(Size(20,20)),
    PanelBox( "To Time",
    ecal = Calendar Box(, SetFunction(Function({this}, ed=ecal<< Get Date) ))
    )
));

sdt = Munger(Format Date(sd, "yyyy-mm-ddThh:mm:ss"), 1, "T", " "); 
edt = Munger(Format Date(ed, "yyyy-mm-ddThh:mm:ss"), 1, "T", " "); 


show(sdt, edt);
 
qstring = EvalInsert(tmpstr);
show(qstring);  //see log

//then run the line below
//dt = Open Database("DSN=xxx ;Description=yyy;UID=zzz;PWD=zzz;APP=JMP;DATABASE=MATS;", qstring);

 

OtisZeca
Level I

Re: Add a new window for Start & End Calendar date selection box/ date entry box

ahh icic.. thanks for your help! 

need more practice understanding what you've written. thank you!

Re: Add a new window for Start & End Calendar date selection box/ date entry box

Here's a modified version of Georgia's script that uses Number Edit Box instead of directly using the Calendar Box.  Number Edit Box has a popup version of the calendar build-in if the numeric format is set to a date.  I set the format to only include the day, but you can include time-of-day as well if you need that level of granularity.

 

NumEditCalendar.png

 

Names Default To Here( 1 );

tmpstr =
"SELECT pen_parametric.pn_id, pen_parametric.equiplk_ky, parametric_dlk.paramlk_ky,
FROM MATS.parametric_dlk parametric_dlk, MATS.pen_parametric pen_parametric
WHERE parametric_dlk.paramlk_ky = parametric_ref_llk.paramlk_ky 
  AND parametric_dlk.paramlk_ky = pen_parametric.paramlk_ky 
   AND ((pen_parametric.part_dm Between {ts '^sdt^'} And {ts '^edt^'}))";

New Window( "Query Date",
	<<Modal, 
	sd = Today();
	ed = Today();
	H List Box(
		Text Box( "From:" ),
		scal = Number Edit Box( sd, <<Set Format( Format( "yyyy-mm-dd" ) ), <<SetFunction( Function( {this}, sd = scal << Get ) ), <<Set Show Spin Box(1) ),
		Spacer Box( Size( 20, 20 ) ),
		Text Box( "To:" ),
		ecal = Number Edit Box( ed, <<Set Format( Format( "yyyy-mm-dd" ) ), <<SetFunction( Function( {this}, ed = ecal << Get ) ), <<Set Show Spin Box(1) ),
	);
);

sdt = Munger( Format Date( sd, "yyyy-mm-ddThh:mm:ss" ), 1, "T", " " );
edt = Munger( Format Date( ed, "yyyy-mm-ddThh:mm:ss" ), 1, "T", " " ); 


Show( sdt, edt );
 
qstring = Eval Insert( tmpstr );
Show( qstring );  //see log
gzmorgan0
Super User (Alumni)

Re: Add a new window for Start & End Calendar date selection box/ date entry box

Dan, @danschikore , thank you.

 

I too like the date formatted NumberEditBox(). I was going to post an alternate script that produces the dialog shown below. However, I thought @OtisZeca might be new to JSL.  Very useful options of the NumberEditbox() includes, setting a minimum, a maximum and specifying integer only.  The attached script uses a function to create a bounded integer number edit box that returns the value to a user specified variable, which is vauable for non-Modal dialogs. I am posting it for the blog, since I know you don't need an example.

 

image.png

Recommended Articles