By: suneel
Date: 2011-06-16
Time: 11:56
|
Current Date display in textbox
hello,
I would like to display the current date based on the condition in text box but it doesn't display. Please look into the below code and let me know if any correcetion.
<input type="text" name="end_date" [onshow.user_cos;if [blk1.end_date]=='0000-00-00 00:00:00';then [onshow.user_cos;blk1='dd/mm/yyyy']; else [blk1.end_date]]; size="20" maxlength="40" readonly/>
tbs version: 3.6.1
|
By: Skrol29
Date: 2011-06-16
Time: 22:29
|
Re: Current Date display in textbox
Hello,
I can see several errors in your snippet. It cannot work.
Something like this should work better:
<input
type="text"
name="end_date"
value="[blk1.end_date;if '[val]'=='0000-00-00 00:00:00';then [var.user_cos;frm='dd/mm/yyyy']; else [val]]"
size="20"
maxlength="40"
readonly="readonly"
/>
|
|
By: suneel
Date: 2011-06-17
Time: 08:28
|
Re: Current Date display in textbox
Thanks for reply. I tried with the same code as it is and i am getting the out put 01/01/1970. do i need to add any plugins or doing anything wrong? Please see below code
<input
type="text"
name="end_date"
value="[blk1.end_date;if '[val]'=='0000-00-00 00:00:00';then [var.user_cos;frm='dd/mm/yyyy']; else [val]]"
size="20"
maxlength="40"
readonly="readonly"
/>
|
By: suneel
Date: 2011-06-20
Time: 09:03
|
Re: Current Date display in textbox
Hello Skrol29,
Please respond to my earlier post.
|
By: Skrol29
Date: 2011-06-20
Time: 22:20
|
Re: Current Date display in textbox
Hello,
I need more detail in order to help.
You have the output 01/01/1970 but for which values ?
You should add [blk1.end_date] and [var.user_cos] just after your snipper to see what are the primitive values of those fields before to be processed with parameters.
|
|
Posting in progress.
Please wait...
|