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%3EAjouter%20une%20nouvelle%20fen%C3%AAtre%20pour%20la%20zone%20de%20s%C3%A9lection%20de%20date%2Fzone%20de%20saisie%20de%20date%20du%20calendrier%20de%20d%C3%A9but%20et%20de%20fin.%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-216467%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3EBonjour%20la%20communaut%C3%A9%20JMP%2C%20j'utilise%20g%C3%A9n%C3%A9ralement%20jmp%20pr%C3%A9s%C3%A9lectionn%C3%A9%20et%20les%20graphiques%20de%20trac%C3%A9%20ont%20besoin%20d'aide%20pour%20ajouter%20la%20date%20de%20s%C3%A9lection%20et%20la%20modification%20de%20mon%20script%20ci-dessous.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EComme%20ci-dessous%2C%20une%20fois%20que%20j'appelle%20la%20base%20de%20donn%C3%A9es%2C%20je%20dois%20modifier%20les%20dates%20de%20d%C3%A9but%20et%20de%20fin%20afin%20d'interroger%20les%20donn%C3%A9es%20n%C3%A9cessaires%20sur%20les%20dates%20d'entr%C3%A9e.%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%3EDonc%20pour%3CSTRONG%3E%20(Entre%20%7Bts'%3CFONT%20color%3D%22%230000FF%22%3E%3CEM%3E%202019-07-01%2000%3A00%3A00%3C%2FEM%3E%3C%2FFONT%3E%20'%7D%20Et%20%7Bts'%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%3EEst-il%20possible%20d'ajouter%20une%20bo%C3%AEte%20de%20script%20qui%20invite%20une%20nouvelle%20fen%C3%AAtre%20de%20calendrier%20pour%20la%20s%C3%A9lection%20du%20calendrier%20selon%20la%20date%20format%C3%A9e%20ci-dessus%20afin%20de%20pouvoir%20remplacer%20la%20date%20par%20celles%20que%20je%20veux%2Fs%C3%A9lectionner%2C%20puis%20ex%C3%A9cuter%20le%20script%26nbsp%3B%3F%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EMerci%20d'avance!%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%3ERe%20%3A%20Ajouter%20une%20nouvelle%20fen%C3%AAtre%20pour%20la%20zone%20de%20s%C3%A9lection%20de%20date%2Fzone%20de%20saisie%20de%20date%20du%20calendrier%20de%20d%C3%A9but%20et%20de%20fin%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%20merci.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EJ'aime%20aussi%20la%20date%20format%C3%A9e%20NumberEditBox().%20J'allais%20publier%20un%20script%20alternatif%20qui%20produit%20la%20bo%C3%AEte%20de%20dialogue%20ci-dessous.%20Cependant%2C%20je%20pensais%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%20pourrait%20%C3%AAtre%20nouveau%20sur%20JSL.Les%20options%20tr%C3%A8s%20utiles%20de%20NumberEditbox()%20incluent%20la%20d%C3%A9finition%20d'un%20minimum%2C%20d'un%20maximum%20et%20la%20sp%C3%A9cification%20d'un%20nombre%20entier%20uniquement.Le%20script%20ci-joint%20utilise%20une%20fonction%20pour%20cr%C3%A9er%20une%20zone%20d'%C3%A9dition%20de%20nombre%20entier%20d%C3%A9limit%C3%A9%20qui%20renvoie%20la%20valeur%20%C3%A0%20une%20variable%20sp%C3%A9cifi%C3%A9e%20par%20l'utilisateur%2C%20qui%20est%20utilisable%20pour%20les%20bo%C3%AEtes%20de%20dialogue%20non%20modales.%20Je%20le%20publie%20pour%20le%20blog%2C%20car%20je%20sais%20que%20vous%20n'avez%20pas%20besoin%20d'exemple.%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%3ERe%20%3A%20Ajouter%20une%20nouvelle%20fen%C3%AAtre%20pour%20la%20zone%20de%20s%C3%A9lection%20de%20date%2Fzone%20de%20saisie%20de%20date%20du%20calendrier%20de%20d%C3%A9but%20et%20de%20fin%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-216890%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3EVoici%20une%20version%20modifi%C3%A9e%20du%20script%20de%20Georgia%20qui%20utilise%20la%20zone%20d'%C3%A9dition%20de%20nombres%20au%20lieu%20d'utiliser%20directement%20la%20zone%20de%20calendrier.Number%20Edit%20Box%20a%20une%20version%20contextuelle%20du%20calendrier%20int%C3%A9gr%C3%A9%20si%20le%20format%20num%C3%A9rique%20est%20d%C3%A9fini%20sur%20une%20date.J'ai%20d%C3%A9fini%20le%20format%20pour%20qu'il%20n'inclue%20que%20le%20jour%2C%20mais%20vous%20pouvez%20%C3%A9galement%20inclure%20l'heure%20si%20vous%20avez%20besoin%20de%20ce%20niveau%20de%20granularit%C3%A9.%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%3ERe%20%3A%20Ajouter%20une%20nouvelle%20fen%C3%AAtre%20pour%20la%20zone%20de%20s%C3%A9lection%20de%20date%2Fzone%20de%20saisie%20de%20date%20du%20calendrier%20de%20d%C3%A9but%20et%20de%20fin%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..%20merci%20pour%20votre%20aide%26nbsp%3B!%3C%2FP%3E%3CP%3Ebesoin%20de%20plus%20de%20pratique%20pour%20comprendre%20ce%20que%20vous%20avez%20%C3%A9crit.%20merci!%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-216479%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3ERe%20%3A%20Ajouter%20une%20nouvelle%20fen%C3%AAtre%20pour%20la%20zone%20de%20s%C3%A9lection%20de%20date%2Fzone%20de%20saisie%20de%20date%20du%20calendrier%20de%20d%C3%A9but%20et%20de%20fin%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%3EIl%20existe%20plusieurs%20m%C3%A9thodes%20pour%20ce%20faire.%20Voici%20un%20exemple%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