This date picker was not available early on, seems Tuvia posted about adapting a JS picker back them. Take the date back a few years and search on this. Tuvia is the man on adding JS and CSS, adding menus and page tabs before FIC had them. Wish I understood half of what he posts...
- James
I've come to a point in coding a form that I need to pop up a date picker when the user clicks in a text box that shows a date. Basically it comes down to two things: 1-how to use java script in FIC, and 2-how to solve this particular need (date picker). I've tried to find some tutorials for this but haven't found any. Does anyone have sample code or can point me in the right direction?
Thanks for the info. I wasn't aware of .wlDatePicker. Very cool. I wish FIC had a help file that I could search for these things, but FIC keeps surprising me with it's cool features. However I can't quite get it working correctly. The textbox is bound to a form prop that has a default value of {//}. When the form is loaded I'm setting thisform.txtDate.value=m.mynewdt (comes from a web service query), but the textbox is never reflecting this. In fact, it's never showing the empty date either. Here's a screen shot of what I'm seeing:
Even when I click on it and get a datepicker (which is cool!) it never updates the display value of thisform.txtDate. Any ideas of what I'm missing?
I may not fully understand what you need, but with a FIC textbox make .wlDatePicker true. Insure textbox is bound as a date, or has {} in the .Value. I only quickly tested this a few weeks ago, and I haven't had a chance to get back to it. Seemed to work fine, I had some initial issues in IOS I need to workout. There is also a .woDatePickerOptions, kinda curious about that one too. Post back anything you discover about the date picker!
This date picker was not available early on, seems Tuvia posted about adapting a JS picker back them. Take the date back a few years and search on this. Tuvia is the man on adding JS and CSS, adding menus and page tabs before FIC had them. Wish I understood half of what he posts...
- James
I've come to a point in coding a form that I need to pop up a date picker when the user clicks in a text box that shows a date. Basically it comes down to two things: 1-how to use java script in FIC, and 2-how to solve this particular need (date picker). I've tried to find some tutorials for this but haven't found any. Does anyone have sample code or can point me in the right direction?
Here is what you can find in http://foxincloud.com/roadmap.php
Enhancement: JavaScript DatePicker support
If, at design time, (Vartype(awTxt.Value) = 'D' or 'D' $ awTxt.format) and awTxt.wlDatePicker and xxxServer.wljQueryUIAdd, FAS automatically assigns a jQueryUI datePicker to the textbox.
By default, FAS sets language and date formats according to the browser first preferred language, English if this language is not provided or supported.
You can customize your datePicker's behavior using the following properties:
- .woDatePickerOptions: set as either a VFP empty object with properties matching those expected by datepicker.setDefaults() [assigned in this.Init()], or a JavaScript object litteral such as {option1:value1, option2:value2, ...} [assigned at design time or in this.Init()]
- .wdFrom, .wdTo: set dynamically in your code to limit the date range user can select.
You can also customize datePicker appearence using jQueryUI global theme (xxxServer.cjQueryUItheme), or additional CSS directives in xxx.css
(all details on jQueryUI datePicker API - such as options, methods and event - at http://api.jqueryui.com/datepicker/)
I've come to a point in coding a form that I need to pop up a date picker when the user clicks in a text box that shows a date. Basically it comes down to two things: 1-how to use java script in FIC, and 2-how to solve this particular need (date picker). I've tried to find some tutorials for this but haven't found any. Does anyone have sample code or can point me in the right direction?
-- thn (FoxInCloud)
DatePicker support was released with version 2.10 on 09/18/2014
You have a sample implementation in objects 'mySearchDateFirst' and 'mySearchDateLast' of
MODIFY CLASS myDemofrmmb OF ab\aw\samples\fic\classe\ficdemo
I may not fully understand what you need, but with a FIC textbox make .wlDatePicker true. Insure textbox is bound as a date, or has {} in the .Value. I only quickly tested this a few weeks ago, and I haven't had a chance to get back to it. Seemed to work fine, I had some initial issues in IOS I need to workout. There is also a .woDatePickerOptions, kinda curious about that one too. Post back anything you discover about the date picker!
This date picker was not available early on, seems Tuvia posted about adapting a JS picker back them. Take the date back a few years and search on this. Tuvia is the man on adding JS and CSS, adding menus and page tabs before FIC had them. Wish I understood half of what he posts...
- James
I've come to a point in coding a form that I need to pop up a date picker when the user clicks in a text box that shows a date. Basically it comes down to two things: 1-how to use java script in FIC, and 2-how to solve this particular need (date picker). I've tried to find some tutorials for this but haven't found any. Does anyone have sample code or can point me in the right direction?
-- thn (FoxInCloud)
So far http://foxincloud.com/roadmap.php is probably the best resource to discover features;
once you've discovered a feature, looking at the PEM descriptions and source code gives additional insight: .wReadMe() and/or 'show parent source code'
then ultimately we are here to help!
PS: http://doc.foxincloud.com/doku.php construction should resume this summer, after shipping version 2.20
Do feel free to spread the word about FoxInCloud on forums, social networks, blogs and the like - the more traction we get, the more we can invest on further developments, including documentation.
regarding your issue,
whenever you define control.controlSource, FoxInCloud does not save .Value because it considers that .value derives from (.controlSource) and this should be saved instead.
In this case, you can either set
thisform.txtDate.controlSource = '' && at design time
and work only with .Value,
or
with thisform.txtDate
store m.mynewdt to (.controlSource)
.refresh() && updates .Value
endwith
In this latter case, make sure the form-level property acting as .controlSource is saved, eg:
procedure thisform.txtDate.init
wcPropSaveEdit(thisform, m.this.controlSource)
Thanks for the info. I wasn't aware of .wlDatePicker. Very cool. I wish FIC had a help file that I could search for these things, but FIC keeps surprising me with it's cool features. However I can't quite get it working correctly. The textbox is bound to a form prop that has a default value of {//}. When the form is loaded I'm setting thisform.txtDate.value=m.mynewdt (comes from a web service query), but the textbox is never reflecting this. In fact, it's never showing the empty date either. Here's a screen shot of what I'm seeing:
Even when I click on it and get a datepicker (which is cool!) it never updates the display value of thisform.txtDate. Any ideas of what I'm missing?
I may not fully understand what you need, but with a FIC textbox make .wlDatePicker true. Insure textbox is bound as a date, or has {} in the .Value. I only quickly tested this a few weeks ago, and I haven't had a chance to get back to it. Seemed to work fine, I had some initial issues in IOS I need to workout. There is also a .woDatePickerOptions, kinda curious about that one too. Post back anything you discover about the date picker!
This date picker was not available early on, seems Tuvia posted about adapting a JS picker back them. Take the date back a few years and search on this. Tuvia is the man on adding JS and CSS, adding menus and page tabs before FIC had them. Wish I understood half of what he posts...
- James
I've come to a point in coding a form that I need to pop up a date picker when the user clicks in a text box that shows a date. Basically it comes down to two things: 1-how to use java script in FIC, and 2-how to solve this particular need (date picker). I've tried to find some tutorials for this but haven't found any. Does anyone have sample code or can point me in the right direction?
I'm not doing something correct. Here is what I'm seeing. On the FIC side, it looks correct:
But in the browser I still get this:
In form.init() I've got this code:
IF thisform.wlInitFirst OR PCOUNT()=0
thisform.txtNewDate.wcPropSave="value,controlsource"
thisform.txtNewDate.Value={//}
ENDIF
and then in form.getdata()
thisform.rescheddt=m.webservicedt
thisform.txtNewDate.value=thisform.rescheddt
thisform.txtNewDate.Refresh()
I have confirmed that m.webservicedt is a good date value in type()='D'
Any idea why I can't get the date to show in thisform.txtNewDate?
Re-hi Ryan,
So far http://foxincloud.com/roadmap.php is probably the best resource to discover features;
once you've discovered a feature, looking at the PEM descriptions and source code gives additional insight: .wReadMe() and/or 'show parent source code'
then ultimately we are here to help!
PS: http://doc.foxincloud.com/doku.php construction should resume this summer, after shipping version 2.20
Do feel free to spread the word about FoxInCloud on forums, social networks, blogs and the like - the more traction we get, the more we can invest on further developments, including documentation.
regarding your issue,
whenever you define control.controlSource, FoxInCloud does not save .Value because it considers that .value derives from (.controlSource) and this should be saved instead.
In this case, you can either set
thisform.txtDate.controlSource = '' && at design time
and work only with .Value,
or
with thisform.txtDate
store m.mynewdt to (.controlSource)
.refresh() && updates .Value
endwith
In this latter case, make sure the form-level property acting as .controlSource is saved, eg:
procedure thisform.txtDate.init
wcPropSaveEdit(thisform, m.this.controlSource)
Thanks for the info. I wasn't aware of .wlDatePicker. Very cool. I wish FIC had a help file that I could search for these things, but FIC keeps surprising me with it's cool features. However I can't quite get it working correctly. The textbox is bound to a form prop that has a default value of {//}. When the form is loaded I'm setting thisform.txtDate.value=m.mynewdt (comes from a web service query), but the textbox is never reflecting this. In fact, it's never showing the empty date either. Here's a screen shot of what I'm seeing:
Even when I click on it and get a datepicker (which is cool!) it never updates the display value of thisform.txtDate. Any ideas of what I'm missing?
I may not fully understand what you need, but with a FIC textbox make .wlDatePicker true. Insure textbox is bound as a date, or has {} in the .Value. I only quickly tested this a few weeks ago, and I haven't had a chance to get back to it. Seemed to work fine, I had some initial issues in IOS I need to workout. There is also a .woDatePickerOptions, kinda curious about that one too. Post back anything you discover about the date picker!
This date picker was not available early on, seems Tuvia posted about adapting a JS picker back them. Take the date back a few years and search on this. Tuvia is the man on adding JS and CSS, adding menus and page tabs before FIC had them. Wish I understood half of what he posts...
- James
I've come to a point in coding a form that I need to pop up a date picker when the user clicks in a text box that shows a date. Basically it comes down to two things: 1-how to use java script in FIC, and 2-how to solve this particular need (date picker). I've tried to find some tutorials for this but haven't found any. Does anyone have sample code or can point me in the right direction?
Here is what I would do:
you don't need that:
IF thisform.wlInitFirst OR PCOUNT()=0
thisform.txtNewDate.wcPropSave="value,controlsource"
thisform.txtNewDate.Value={//}
ENDIF
You can just set .controlSource and .value in designer
then
procedure thisForm.getdata
thisform.rescheddt=m.webservicedt
thisform.Refresh && this will propagate to all member objects
Thierry,
I'm not doing something correct. Here is what I'm seeing. On the FIC side, it looks correct:
But in the browser I still get this:
In form.init() I've got this code:
IF thisform.wlInitFirst OR PCOUNT()=0
thisform.txtNewDate.wcPropSave="value,controlsource"
thisform.txtNewDate.Value={//}
ENDIF
and then in form.getdata()
thisform.rescheddt=m.webservicedt
thisform.txtNewDate.value=thisform.rescheddt
thisform.txtNewDate.Refresh()
I have confirmed that m.webservicedt is a good date value in type()='D'
Any idea why I can't get the date to show in thisform.txtNewDate?
Re-hi Ryan,
So far http://foxincloud.com/roadmap.php is probably the best resource to discover features;
once you've discovered a feature, looking at the PEM descriptions and source code gives additional insight: .wReadMe() and/or 'show parent source code'
then ultimately we are here to help!
PS: http://doc.foxincloud.com/doku.php construction should resume this summer, after shipping version 2.20
Do feel free to spread the word about FoxInCloud on forums, social networks, blogs and the like - the more traction we get, the more we can invest on further developments, including documentation.
regarding your issue,
whenever you define control.controlSource, FoxInCloud does not save .Value because it considers that .value derives from (.controlSource) and this should be saved instead.
In this case, you can either set
thisform.txtDate.controlSource = '' && at design time
and work only with .Value,
or
with thisform.txtDate
store m.mynewdt to (.controlSource)
.refresh() && updates .Value
endwith
In this latter case, make sure the form-level property acting as .controlSource is saved, eg:
procedure thisform.txtDate.init
wcPropSaveEdit(thisform, m.this.controlSource)
Thanks for the info. I wasn't aware of .wlDatePicker. Very cool. I wish FIC had a help file that I could search for these things, but FIC keeps surprising me with it's cool features. However I can't quite get it working correctly. The textbox is bound to a form prop that has a default value of {//}. When the form is loaded I'm setting thisform.txtDate.value=m.mynewdt (comes from a web service query), but the textbox is never reflecting this. In fact, it's never showing the empty date either. Here's a screen shot of what I'm seeing:
Even when I click on it and get a datepicker (which is cool!) it never updates the display value of thisform.txtDate. Any ideas of what I'm missing?
I may not fully understand what you need, but with a FIC textbox make .wlDatePicker true. Insure textbox is bound as a date, or has {} in the .Value. I only quickly tested this a few weeks ago, and I haven't had a chance to get back to it. Seemed to work fine, I had some initial issues in IOS I need to workout. There is also a .woDatePickerOptions, kinda curious about that one too. Post back anything you discover about the date picker!
This date picker was not available early on, seems Tuvia posted about adapting a JS picker back them. Take the date back a few years and search on this. Tuvia is the man on adding JS and CSS, adding menus and page tabs before FIC had them. Wish I understood half of what he posts...
- James
I've come to a point in coding a form that I need to pop up a date picker when the user clicks in a text box that shows a date. Basically it comes down to two things: 1-how to use java script in FIC, and 2-how to solve this particular need (date picker). I've tried to find some tutorials for this but haven't found any. Does anyone have sample code or can point me in the right direction?
-- thn (FoxInCloud)
To recap, thisform.refresh_ looks like:
lparameters void_parameter_reminder_implement_your_Refresh_code_in_this_methodthisform.getData()
and thisform.getData now includes:
thisform.rescheddt=m.mywsdate
thisform.txtNewDate.value=thisform.rescheddt
thisform.refresh()
Maybe I'm guessing wrong about what's causing the infinite loop, but when I comment out the thisform.refresh() call in thisform.getdata() the form loads, but doesn't show the date value. If I uncomment it, the form doesn't load. Ideas?
Ryan,
Here is what I would do:
you don't need that:
IF thisform.wlInitFirst OR PCOUNT()=0
thisform.txtNewDate.wcPropSave="value,controlsource"
thisform.txtNewDate.Value={//}
ENDIF
You can just set .controlSource and .value in designer
then
procedure thisForm.getdata
thisform.rescheddt=m.webservicedt
thisform.Refresh && this will propagate to all member objects
Thierry,
I'm not doing something correct. Here is what I'm seeing. On the FIC side, it looks correct:
But in the browser I still get this:
In form.init() I've got this code:
IF thisform.wlInitFirst OR PCOUNT()=0
thisform.txtNewDate.wcPropSave="value,controlsource"
thisform.txtNewDate.Value={//}
ENDIF
and then in form.getdata()
thisform.rescheddt=m.webservicedt
thisform.txtNewDate.value=thisform.rescheddt
thisform.txtNewDate.Refresh()
I have confirmed that m.webservicedt is a good date value in type()='D'
Any idea why I can't get the date to show in thisform.txtNewDate?
Re-hi Ryan,
So far http://foxincloud.com/roadmap.php is probably the best resource to discover features;
once you've discovered a feature, looking at the PEM descriptions and source code gives additional insight: .wReadMe() and/or 'show parent source code'
then ultimately we are here to help!
PS: http://doc.foxincloud.com/doku.php construction should resume this summer, after shipping version 2.20
Do feel free to spread the word about FoxInCloud on forums, social networks, blogs and the like - the more traction we get, the more we can invest on further developments, including documentation.
regarding your issue,
whenever you define control.controlSource, FoxInCloud does not save .Value because it considers that .value derives from (.controlSource) and this should be saved instead.
In this case, you can either set
thisform.txtDate.controlSource = '' && at design time
and work only with .Value,
or
with thisform.txtDate
store m.mynewdt to (.controlSource)
.refresh() && updates .Value
endwith
In this latter case, make sure the form-level property acting as .controlSource is saved, eg:
procedure thisform.txtDate.init
wcPropSaveEdit(thisform, m.this.controlSource)
Thanks for the info. I wasn't aware of .wlDatePicker. Very cool. I wish FIC had a help file that I could search for these things, but FIC keeps surprising me with it's cool features. However I can't quite get it working correctly. The textbox is bound to a form prop that has a default value of {//}. When the form is loaded I'm setting thisform.txtDate.value=m.mynewdt (comes from a web service query), but the textbox is never reflecting this. In fact, it's never showing the empty date either. Here's a screen shot of what I'm seeing:
Even when I click on it and get a datepicker (which is cool!) it never updates the display value of thisform.txtDate. Any ideas of what I'm missing?
I may not fully understand what you need, but with a FIC textbox make .wlDatePicker true. Insure textbox is bound as a date, or has {} in the .Value. I only quickly tested this a few weeks ago, and I haven't had a chance to get back to it. Seemed to work fine, I had some initial issues in IOS I need to workout. There is also a .woDatePickerOptions, kinda curious about that one too. Post back anything you discover about the date picker!
This date picker was not available early on, seems Tuvia posted about adapting a JS picker back them. Take the date back a few years and search on this. Tuvia is the man on adding JS and CSS, adding menus and page tabs before FIC had them. Wish I understood half of what he posts...
- James
I've come to a point in coding a form that I need to pop up a date picker when the user clicks in a text box that shows a date. Basically it comes down to two things: 1-how to use java script in FIC, and 2-how to solve this particular need (date picker). I've tried to find some tutorials for this but haven't found any. Does anyone have sample code or can point me in the right direction?
you need to choose whether you use .controlSource or work on .value
either one works, both don't
This code is designed for using .controlSource (option I prefer)
thisform.txtNewDate.controlSource = 'thisform.rescheddt'procedure form.refresh_
thisform.rescheddt=m.mywsdate
thisform.txtNewDate.Refresh() will later execute automatically and adjust thisform.txtNewDate.Value according to thisform.txtNewDate.controlSource
Trying to code it like you suggested, I seem to be going into an infinite loop. In thisform.getdata() I added a thisform.refresh() to get my date value to show up. I'm guessing my code in thisform.refresh_ that calls thisform.getdata() is getting called again via my thisform.refresh(), thus causing the infinite loop.
To recap, thisform.refresh_ looks like:
lparameters void_parameter_reminder_implement_your_Refresh_code_in_this_methodthisform.getData()
and thisform.getData now includes:
thisform.rescheddt=m.mywsdate
thisform.txtNewDate.value=thisform.rescheddt
thisform.refresh()
Maybe I'm guessing wrong about what's causing the infinite loop, but when I comment out the thisform.refresh() call in thisform.getdata() the form loads, but doesn't show the date value. If I uncomment it, the form doesn't load. Ideas?
Ryan,
Here is what I would do:
you don't need that:
IF thisform.wlInitFirst OR PCOUNT()=0
thisform.txtNewDate.wcPropSave="value,controlsource"
thisform.txtNewDate.Value={//}
ENDIF
You can just set .controlSource and .value in designer
then
procedure thisForm.getdata
thisform.rescheddt=m.webservicedt
thisform.Refresh && this will propagate to all member objects
Thierry,
I'm not doing something correct. Here is what I'm seeing. On the FIC side, it looks correct:
But in the browser I still get this:
In form.init() I've got this code:
IF thisform.wlInitFirst OR PCOUNT()=0
thisform.txtNewDate.wcPropSave="value,controlsource"
thisform.txtNewDate.Value={//}
ENDIF
and then in form.getdata()
thisform.rescheddt=m.webservicedt
thisform.txtNewDate.value=thisform.rescheddt
thisform.txtNewDate.Refresh()
I have confirmed that m.webservicedt is a good date value in type()='D'
Any idea why I can't get the date to show in thisform.txtNewDate?
Re-hi Ryan,
So far http://foxincloud.com/roadmap.php is probably the best resource to discover features;
once you've discovered a feature, looking at the PEM descriptions and source code gives additional insight: .wReadMe() and/or 'show parent source code'
then ultimately we are here to help!
PS: http://doc.foxincloud.com/doku.php construction should resume this summer, after shipping version 2.20
Do feel free to spread the word about FoxInCloud on forums, social networks, blogs and the like - the more traction we get, the more we can invest on further developments, including documentation.
regarding your issue,
whenever you define control.controlSource, FoxInCloud does not save .Value because it considers that .value derives from (.controlSource) and this should be saved instead.
In this case, you can either set
thisform.txtDate.controlSource = '' && at design time
and work only with .Value,
or
with thisform.txtDate
store m.mynewdt to (.controlSource)
.refresh() && updates .Value
endwith
In this latter case, make sure the form-level property acting as .controlSource is saved, eg:
procedure thisform.txtDate.init
wcPropSaveEdit(thisform, m.this.controlSource)
Thanks for the info. I wasn't aware of .wlDatePicker. Very cool. I wish FIC had a help file that I could search for these things, but FIC keeps surprising me with it's cool features. However I can't quite get it working correctly. The textbox is bound to a form prop that has a default value of {//}. When the form is loaded I'm setting thisform.txtDate.value=m.mynewdt (comes from a web service query), but the textbox is never reflecting this. In fact, it's never showing the empty date either. Here's a screen shot of what I'm seeing:
Even when I click on it and get a datepicker (which is cool!) it never updates the display value of thisform.txtDate. Any ideas of what I'm missing?
I may not fully understand what you need, but with a FIC textbox make .wlDatePicker true. Insure textbox is bound as a date, or has {} in the .Value. I only quickly tested this a few weeks ago, and I haven't had a chance to get back to it. Seemed to work fine, I had some initial issues in IOS I need to workout. There is also a .woDatePickerOptions, kinda curious about that one too. Post back anything you discover about the date picker!
This date picker was not available early on, seems Tuvia posted about adapting a JS picker back them. Take the date back a few years and search on this. Tuvia is the man on adding JS and CSS, adding menus and page tabs before FIC had them. Wish I understood half of what he posts...
- James
I've come to a point in coding a form that I need to pop up a date picker when the user clicks in a text box that shows a date. Basically it comes down to two things: 1-how to use java script in FIC, and 2-how to solve this particular need (date picker). I've tried to find some tutorials for this but haven't found any. Does anyone have sample code or can point me in the right direction?
Still can't get the date value to show in the browser. Here is how my code looks:
In the designer, I've set the default value of thisform.rescheddt to {//}
and thisform.txtNewDate.controlsource=thisform.rescheddt
thisform.init()IF thisform.wlInitFirst OR PCOUNT()=0
thisform.wcPropSave="this.hadInstantiationError,this.rescheddt"
ENDIF
thisform.refresh_()
lparameters void_parameter_reminder_implement_your_Refresh_code_in_this_methodthisform.getData()
thisform.txtNewDate.Refresh()
Then
thisform.getdata()thisform.rescheddt=m.mywsdate
thisform.txtNewDate.controlSource = 'thisform.rescheddt'
The date value is showing up in the vfp window, but not in the browser (same as before).
I'm sorry to take up so much of your time, but I can't quite figure out what I'm doing wrong.
Right, was not aware of this possible looping
you need to choose whether you use .controlSource or work on .value
either one works, both don't
This code is designed for using .controlSource (option I prefer)
thisform.txtNewDate.controlSource = 'thisform.rescheddt'procedure form.refresh_
thisform.rescheddt=m.mywsdate
thisform.txtNewDate.Refresh() will later execute automatically and adjust thisform.txtNewDate.Value according to thisform.txtNewDate.controlSource
Trying to code it like you suggested, I seem to be going into an infinite loop. In thisform.getdata() I added a thisform.refresh() to get my date value to show up. I'm guessing my code in thisform.refresh_ that calls thisform.getdata() is getting called again via my thisform.refresh(), thus causing the infinite loop.
To recap, thisform.refresh_ looks like:
lparameters void_parameter_reminder_implement_your_Refresh_code_in_this_methodthisform.getData()
and thisform.getData now includes:
thisform.rescheddt=m.mywsdate
thisform.txtNewDate.value=thisform.rescheddt
thisform.refresh()
Maybe I'm guessing wrong about what's causing the infinite loop, but when I comment out the thisform.refresh() call in thisform.getdata() the form loads, but doesn't show the date value. If I uncomment it, the form doesn't load. Ideas?
Ryan,
Here is what I would do:
you don't need that:
IF thisform.wlInitFirst OR PCOUNT()=0
thisform.txtNewDate.wcPropSave="value,controlsource"
thisform.txtNewDate.Value={//}
ENDIF
You can just set .controlSource and .value in designer
then
procedure thisForm.getdata
thisform.rescheddt=m.webservicedt
thisform.Refresh && this will propagate to all member objects
Thierry,
I'm not doing something correct. Here is what I'm seeing. On the FIC side, it looks correct:
But in the browser I still get this:
In form.init() I've got this code:
IF thisform.wlInitFirst OR PCOUNT()=0
thisform.txtNewDate.wcPropSave="value,controlsource"
thisform.txtNewDate.Value={//}
ENDIF
and then in form.getdata()
thisform.rescheddt=m.webservicedt
thisform.txtNewDate.value=thisform.rescheddt
thisform.txtNewDate.Refresh()
I have confirmed that m.webservicedt is a good date value in type()='D'
Any idea why I can't get the date to show in thisform.txtNewDate?
Re-hi Ryan,
So far http://foxincloud.com/roadmap.php is probably the best resource to discover features;
once you've discovered a feature, looking at the PEM descriptions and source code gives additional insight: .wReadMe() and/or 'show parent source code'
then ultimately we are here to help!
PS: http://doc.foxincloud.com/doku.php construction should resume this summer, after shipping version 2.20
Do feel free to spread the word about FoxInCloud on forums, social networks, blogs and the like - the more traction we get, the more we can invest on further developments, including documentation.
regarding your issue,
whenever you define control.controlSource, FoxInCloud does not save .Value because it considers that .value derives from (.controlSource) and this should be saved instead.
In this case, you can either set
thisform.txtDate.controlSource = '' && at design time
and work only with .Value,
or
with thisform.txtDate
store m.mynewdt to (.controlSource)
.refresh() && updates .Value
endwith
In this latter case, make sure the form-level property acting as .controlSource is saved, eg:
procedure thisform.txtDate.init
wcPropSaveEdit(thisform, m.this.controlSource)
Thanks for the info. I wasn't aware of .wlDatePicker. Very cool. I wish FIC had a help file that I could search for these things, but FIC keeps surprising me with it's cool features. However I can't quite get it working correctly. The textbox is bound to a form prop that has a default value of {//}. When the form is loaded I'm setting thisform.txtDate.value=m.mynewdt (comes from a web service query), but the textbox is never reflecting this. In fact, it's never showing the empty date either. Here's a screen shot of what I'm seeing:
Even when I click on it and get a datepicker (which is cool!) it never updates the display value of thisform.txtDate. Any ideas of what I'm missing?
I may not fully understand what you need, but with a FIC textbox make .wlDatePicker true. Insure textbox is bound as a date, or has {} in the .Value. I only quickly tested this a few weeks ago, and I haven't had a chance to get back to it. Seemed to work fine, I had some initial issues in IOS I need to workout. There is also a .woDatePickerOptions, kinda curious about that one too. Post back anything you discover about the date picker!
This date picker was not available early on, seems Tuvia posted about adapting a JS picker back them. Take the date back a few years and search on this. Tuvia is the man on adding JS and CSS, adding menus and page tabs before FIC had them. Wish I understood half of what he posts...
- James
I've come to a point in coding a form that I need to pop up a date picker when the user clicks in a text box that shows a date. Basically it comes down to two things: 1-how to use java script in FIC, and 2-how to solve this particular need (date picker). I've tried to find some tutorials for this but haven't found any. Does anyone have sample code or can point me in the right direction?
Please do this in form.load() and user wcPropSaveEdit():
procedure form.load
wcPropSaveEdit(this, "hadInstantiationError, rescheddt")
Once .controlSource is assigned at design time, non need to reassign at each event
Wow, I really must be missing something as I'm sure it can't be this hard :)
Still can't get the date value to show in the browser. Here is how my code looks:
In the designer, I've set the default value of thisform.rescheddt to {//}
and thisform.txtNewDate.controlsource=thisform.rescheddt
thisform.init()IF thisform.wlInitFirst OR PCOUNT()=0
thisform.wcPropSave="this.hadInstantiationError,this.rescheddt"
ENDIF
thisform.refresh_()
lparameters void_parameter_reminder_implement_your_Refresh_code_in_this_methodthisform.getData()
thisform.txtNewDate.Refresh()
Then
thisform.getdata()thisform.rescheddt=m.mywsdate
thisform.txtNewDate.controlSource = 'thisform.rescheddt'
The date value is showing up in the vfp window, but not in the browser (same as before).
I'm sorry to take up so much of your time, but I can't quite figure out what I'm doing wrong.
Right, was not aware of this possible looping
you need to choose whether you use .controlSource or work on .value
either one works, both don't
This code is designed for using .controlSource (option I prefer)
thisform.txtNewDate.controlSource = 'thisform.rescheddt'procedure form.refresh_
thisform.rescheddt=m.mywsdate
thisform.txtNewDate.Refresh() will later execute automatically and adjust thisform.txtNewDate.Value according to thisform.txtNewDate.controlSource
Trying to code it like you suggested, I seem to be going into an infinite loop. In thisform.getdata() I added a thisform.refresh() to get my date value to show up. I'm guessing my code in thisform.refresh_ that calls thisform.getdata() is getting called again via my thisform.refresh(), thus causing the infinite loop.
To recap, thisform.refresh_ looks like:
lparameters void_parameter_reminder_implement_your_Refresh_code_in_this_methodthisform.getData()
and thisform.getData now includes:
thisform.rescheddt=m.mywsdate
thisform.txtNewDate.value=thisform.rescheddt
thisform.refresh()
Maybe I'm guessing wrong about what's causing the infinite loop, but when I comment out the thisform.refresh() call in thisform.getdata() the form loads, but doesn't show the date value. If I uncomment it, the form doesn't load. Ideas?
Ryan,
Here is what I would do:
you don't need that:
IF thisform.wlInitFirst OR PCOUNT()=0
thisform.txtNewDate.wcPropSave="value,controlsource"
thisform.txtNewDate.Value={//}
ENDIF
You can just set .controlSource and .value in designer
then
procedure thisForm.getdata
thisform.rescheddt=m.webservicedt
thisform.Refresh && this will propagate to all member objects
Thierry,
I'm not doing something correct. Here is what I'm seeing. On the FIC side, it looks correct:
But in the browser I still get this:
In form.init() I've got this code:
IF thisform.wlInitFirst OR PCOUNT()=0
thisform.txtNewDate.wcPropSave="value,controlsource"
thisform.txtNewDate.Value={//}
ENDIF
and then in form.getdata()
thisform.rescheddt=m.webservicedt
thisform.txtNewDate.value=thisform.rescheddt
thisform.txtNewDate.Refresh()
I have confirmed that m.webservicedt is a good date value in type()='D'
Any idea why I can't get the date to show in thisform.txtNewDate?
Re-hi Ryan,
So far http://foxincloud.com/roadmap.php is probably the best resource to discover features;
once you've discovered a feature, looking at the PEM descriptions and source code gives additional insight: .wReadMe() and/or 'show parent source code'
then ultimately we are here to help!
PS: http://doc.foxincloud.com/doku.php construction should resume this summer, after shipping version 2.20
Do feel free to spread the word about FoxInCloud on forums, social networks, blogs and the like - the more traction we get, the more we can invest on further developments, including documentation.
regarding your issue,
whenever you define control.controlSource, FoxInCloud does not save .Value because it considers that .value derives from (.controlSource) and this should be saved instead.
In this case, you can either set
thisform.txtDate.controlSource = '' && at design time
and work only with .Value,
or
with thisform.txtDate
store m.mynewdt to (.controlSource)
.refresh() && updates .Value
endwith
In this latter case, make sure the form-level property acting as .controlSource is saved, eg:
procedure thisform.txtDate.init
wcPropSaveEdit(thisform, m.this.controlSource)
Thanks for the info. I wasn't aware of .wlDatePicker. Very cool. I wish FIC had a help file that I could search for these things, but FIC keeps surprising me with it's cool features. However I can't quite get it working correctly. The textbox is bound to a form prop that has a default value of {//}. When the form is loaded I'm setting thisform.txtDate.value=m.mynewdt (comes from a web service query), but the textbox is never reflecting this. In fact, it's never showing the empty date either. Here's a screen shot of what I'm seeing:
Even when I click on it and get a datepicker (which is cool!) it never updates the display value of thisform.txtDate. Any ideas of what I'm missing?
I may not fully understand what you need, but with a FIC textbox make .wlDatePicker true. Insure textbox is bound as a date, or has {} in the .Value. I only quickly tested this a few weeks ago, and I haven't had a chance to get back to it. Seemed to work fine, I had some initial issues in IOS I need to workout. There is also a .woDatePickerOptions, kinda curious about that one too. Post back anything you discover about the date picker!
This date picker was not available early on, seems Tuvia posted about adapting a JS picker back them. Take the date back a few years and search on this. Tuvia is the man on adding JS and CSS, adding menus and page tabs before FIC had them. Wish I understood half of what he posts...
- James
I've come to a point in coding a form that I need to pop up a date picker when the user clicks in a text box that shows a date. Basically it comes down to two things: 1-how to use java script in FIC, and 2-how to solve this particular need (date picker). I've tried to find some tutorials for this but haven't found any. Does anyone have sample code or can point me in the right direction?
-- thn (FoxInCloud)
Please do this in form.load() and user wcPropSaveEdit():
procedure form.load
wcPropSaveEdit(this, "hadInstantiationError, rescheddt")
Once .controlSource is assigned at design time, non need to reassign at each event
Wow, I really must be missing something as I'm sure it can't be this hard :)
Still can't get the date value to show in the browser. Here is how my code looks:
In the designer, I've set the default value of thisform.rescheddt to {//}
and thisform.txtNewDate.controlsource=thisform.rescheddt
thisform.init()IF thisform.wlInitFirst OR PCOUNT()=0
thisform.wcPropSave="this.hadInstantiationError,this.rescheddt"
ENDIF
thisform.refresh_()
lparameters void_parameter_reminder_implement_your_Refresh_code_in_this_methodthisform.getData()
thisform.txtNewDate.Refresh()
Then
thisform.getdata()thisform.rescheddt=m.mywsdate
thisform.txtNewDate.controlSource = 'thisform.rescheddt'
The date value is showing up in the vfp window, but not in the browser (same as before).
I'm sorry to take up so much of your time, but I can't quite figure out what I'm doing wrong.
Right, was not aware of this possible looping
you need to choose whether you use .controlSource or work on .value
either one works, both don't
This code is designed for using .controlSource (option I prefer)
thisform.txtNewDate.controlSource = 'thisform.rescheddt'procedure form.refresh_
thisform.rescheddt=m.mywsdate
thisform.txtNewDate.Refresh() will later execute automatically and adjust thisform.txtNewDate.Value according to thisform.txtNewDate.controlSource
Trying to code it like you suggested, I seem to be going into an infinite loop. In thisform.getdata() I added a thisform.refresh() to get my date value to show up. I'm guessing my code in thisform.refresh_ that calls thisform.getdata() is getting called again via my thisform.refresh(), thus causing the infinite loop.
To recap, thisform.refresh_ looks like:
lparameters void_parameter_reminder_implement_your_Refresh_code_in_this_methodthisform.getData()
and thisform.getData now includes:
thisform.rescheddt=m.mywsdate
thisform.txtNewDate.value=thisform.rescheddt
thisform.refresh()
Maybe I'm guessing wrong about what's causing the infinite loop, but when I comment out the thisform.refresh() call in thisform.getdata() the form loads, but doesn't show the date value. If I uncomment it, the form doesn't load. Ideas?
Ryan,
Here is what I would do:
you don't need that:
IF thisform.wlInitFirst OR PCOUNT()=0
thisform.txtNewDate.wcPropSave="value,controlsource"
thisform.txtNewDate.Value={//}
ENDIF
You can just set .controlSource and .value in designer
then
procedure thisForm.getdata
thisform.rescheddt=m.webservicedt
thisform.Refresh && this will propagate to all member objects
Thierry,
I'm not doing something correct. Here is what I'm seeing. On the FIC side, it looks correct:
But in the browser I still get this:
In form.init() I've got this code:
IF thisform.wlInitFirst OR PCOUNT()=0
thisform.txtNewDate.wcPropSave="value,controlsource"
thisform.txtNewDate.Value={//}
ENDIF
and then in form.getdata()
thisform.rescheddt=m.webservicedt
thisform.txtNewDate.value=thisform.rescheddt
thisform.txtNewDate.Refresh()
I have confirmed that m.webservicedt is a good date value in type()='D'
Any idea why I can't get the date to show in thisform.txtNewDate?
Re-hi Ryan,
So far http://foxincloud.com/roadmap.php is probably the best resource to discover features;
once you've discovered a feature, looking at the PEM descriptions and source code gives additional insight: .wReadMe() and/or 'show parent source code'
then ultimately we are here to help!
PS: http://doc.foxincloud.com/doku.php construction should resume this summer, after shipping version 2.20
Do feel free to spread the word about FoxInCloud on forums, social networks, blogs and the like - the more traction we get, the more we can invest on further developments, including documentation.
regarding your issue,
whenever you define control.controlSource, FoxInCloud does not save .Value because it considers that .value derives from (.controlSource) and this should be saved instead.
In this case, you can either set
thisform.txtDate.controlSource = '' && at design time
and work only with .Value,
or
with thisform.txtDate
store m.mynewdt to (.controlSource)
.refresh() && updates .Value
endwith
In this latter case, make sure the form-level property acting as .controlSource is saved, eg:
procedure thisform.txtDate.init
wcPropSaveEdit(thisform, m.this.controlSource)
Thanks for the info. I wasn't aware of .wlDatePicker. Very cool. I wish FIC had a help file that I could search for these things, but FIC keeps surprising me with it's cool features. However I can't quite get it working correctly. The textbox is bound to a form prop that has a default value of {//}. When the form is loaded I'm setting thisform.txtDate.value=m.mynewdt (comes from a web service query), but the textbox is never reflecting this. In fact, it's never showing the empty date either. Here's a screen shot of what I'm seeing:
Even when I click on it and get a datepicker (which is cool!) it never updates the display value of thisform.txtDate. Any ideas of what I'm missing?
I may not fully understand what you need, but with a FIC textbox make .wlDatePicker true. Insure textbox is bound as a date, or has {} in the .Value. I only quickly tested this a few weeks ago, and I haven't had a chance to get back to it. Seemed to work fine, I had some initial issues in IOS I need to workout. There is also a .woDatePickerOptions, kinda curious about that one too. Post back anything you discover about the date picker!
This date picker was not available early on, seems Tuvia posted about adapting a JS picker back them. Take the date back a few years and search on this. Tuvia is the man on adding JS and CSS, adding menus and page tabs before FIC had them. Wish I understood half of what he posts...
- James
I've come to a point in coding a form that I need to pop up a date picker when the user clicks in a text box that shows a date. Basically it comes down to two things: 1-how to use java script in FIC, and 2-how to solve this particular need (date picker). I've tried to find some tutorials for this but haven't found any. Does anyone have sample code or can point me in the right direction?
procedure getData
...
thisform.txtDate.value = m.webservicedt
don't worry about .wcPropSave - FoxInCloud takes the right default whether .controlSource is used or not
Made those changes, still not working. Any other ideas?
Please do this in form.load() and user wcPropSaveEdit():
procedure form.load
wcPropSaveEdit(this, "hadInstantiationError, rescheddt")
Once .controlSource is assigned at design time, non need to reassign at each event
Wow, I really must be missing something as I'm sure it can't be this hard :)
Still can't get the date value to show in the browser. Here is how my code looks:
In the designer, I've set the default value of thisform.rescheddt to {//}
and thisform.txtNewDate.controlsource=thisform.rescheddt
thisform.init()IF thisform.wlInitFirst OR PCOUNT()=0
thisform.wcPropSave="this.hadInstantiationError,this.rescheddt"
ENDIF
thisform.refresh_()
lparameters void_parameter_reminder_implement_your_Refresh_code_in_this_methodthisform.getData()
thisform.txtNewDate.Refresh()
Then
thisform.getdata()thisform.rescheddt=m.mywsdate
thisform.txtNewDate.controlSource = 'thisform.rescheddt'
The date value is showing up in the vfp window, but not in the browser (same as before).
I'm sorry to take up so much of your time, but I can't quite figure out what I'm doing wrong.
Right, was not aware of this possible looping
you need to choose whether you use .controlSource or work on .value
either one works, both don't
This code is designed for using .controlSource (option I prefer)
thisform.txtNewDate.controlSource = 'thisform.rescheddt'procedure form.refresh_
thisform.rescheddt=m.mywsdate
thisform.txtNewDate.Refresh() will later execute automatically and adjust thisform.txtNewDate.Value according to thisform.txtNewDate.controlSource
Trying to code it like you suggested, I seem to be going into an infinite loop. In thisform.getdata() I added a thisform.refresh() to get my date value to show up. I'm guessing my code in thisform.refresh_ that calls thisform.getdata() is getting called again via my thisform.refresh(), thus causing the infinite loop.
To recap, thisform.refresh_ looks like:
lparameters void_parameter_reminder_implement_your_Refresh_code_in_this_methodthisform.getData()
and thisform.getData now includes:
thisform.rescheddt=m.mywsdate
thisform.txtNewDate.value=thisform.rescheddt
thisform.refresh()
Maybe I'm guessing wrong about what's causing the infinite loop, but when I comment out the thisform.refresh() call in thisform.getdata() the form loads, but doesn't show the date value. If I uncomment it, the form doesn't load. Ideas?
Ryan,
Here is what I would do:
you don't need that:
IF thisform.wlInitFirst OR PCOUNT()=0
thisform.txtNewDate.wcPropSave="value,controlsource"
thisform.txtNewDate.Value={//}
ENDIF
You can just set .controlSource and .value in designer
then
procedure thisForm.getdata
thisform.rescheddt=m.webservicedt
thisform.Refresh && this will propagate to all member objects
Thierry,
I'm not doing something correct. Here is what I'm seeing. On the FIC side, it looks correct:
But in the browser I still get this:
In form.init() I've got this code:
IF thisform.wlInitFirst OR PCOUNT()=0
thisform.txtNewDate.wcPropSave="value,controlsource"
thisform.txtNewDate.Value={//}
ENDIF
and then in form.getdata()
thisform.rescheddt=m.webservicedt
thisform.txtNewDate.value=thisform.rescheddt
thisform.txtNewDate.Refresh()
I have confirmed that m.webservicedt is a good date value in type()='D'
Any idea why I can't get the date to show in thisform.txtNewDate?
Re-hi Ryan,
So far http://foxincloud.com/roadmap.php is probably the best resource to discover features;
once you've discovered a feature, looking at the PEM descriptions and source code gives additional insight: .wReadMe() and/or 'show parent source code'
then ultimately we are here to help!
PS: http://doc.foxincloud.com/doku.php construction should resume this summer, after shipping version 2.20
Do feel free to spread the word about FoxInCloud on forums, social networks, blogs and the like - the more traction we get, the more we can invest on further developments, including documentation.
regarding your issue,
whenever you define control.controlSource, FoxInCloud does not save .Value because it considers that .value derives from (.controlSource) and this should be saved instead.
In this case, you can either set
thisform.txtDate.controlSource = '' && at design time
and work only with .Value,
or
with thisform.txtDate
store m.mynewdt to (.controlSource)
.refresh() && updates .Value
endwith
In this latter case, make sure the form-level property acting as .controlSource is saved, eg:
procedure thisform.txtDate.init
wcPropSaveEdit(thisform, m.this.controlSource)
Thanks for the info. I wasn't aware of .wlDatePicker. Very cool. I wish FIC had a help file that I could search for these things, but FIC keeps surprising me with it's cool features. However I can't quite get it working correctly. The textbox is bound to a form prop that has a default value of {//}. When the form is loaded I'm setting thisform.txtDate.value=m.mynewdt (comes from a web service query), but the textbox is never reflecting this. In fact, it's never showing the empty date either. Here's a screen shot of what I'm seeing:
Even when I click on it and get a datepicker (which is cool!) it never updates the display value of thisform.txtDate. Any ideas of what I'm missing?
I may not fully understand what you need, but with a FIC textbox make .wlDatePicker true. Insure textbox is bound as a date, or has {} in the .Value. I only quickly tested this a few weeks ago, and I haven't had a chance to get back to it. Seemed to work fine, I had some initial issues in IOS I need to workout. There is also a .woDatePickerOptions, kinda curious about that one too. Post back anything you discover about the date picker!
This date picker was not available early on, seems Tuvia posted about adapting a JS picker back them. Take the date back a few years and search on this. Tuvia is the man on adding JS and CSS, adding menus and page tabs before FIC had them. Wish I understood half of what he posts...
- James
I've come to a point in coding a form that I need to pop up a date picker when the user clicks in a text box that shows a date. Basically it comes down to two things: 1-how to use java script in FIC, and 2-how to solve this particular need (date picker). I've tried to find some tutorials for this but haven't found any. Does anyone have sample code or can point me in the right direction?
-- thn (FoxInCloud)