F
Fred Boer
I'm enjoying Infopath, but I have run into problems.. It's about time...
well, dates, actually!
I realize that manipulating dates in Infopath is, well, interesting. I have
read some articles and even cut and pasted some JScript, but have no idea if
I am on the right track or if I can do what I want.
I want to create an attendance form. On the top of the form I want a
DatePicker which the employee will use to enter the first day of the month.
Using that value, I want a table to fill up with the dates and days of the
week... i.e. One column showing the date, one showing the day "Monday", and
then one with a text field for an attendance code...
I have fiddled with some JScript code and I can pop up a messagebox that,
say, adds a day onto today's date. Something like this:
function CTRL3_5::OnClick(eventObj)
{
today = new Date(); // Get today's date.
yesterdayDate = today.getDate() - 1 ;
today.setDate( yesterdayDate );
XDocument.UI.Alert("Yesterday was " + today)};
What I want to know is how I could use the value that the employee enters in
the DatePicker and stick it into the formula above... or is that even
possible?
Thanks
well, dates, actually!
I realize that manipulating dates in Infopath is, well, interesting. I have
read some articles and even cut and pasted some JScript, but have no idea if
I am on the right track or if I can do what I want.
I want to create an attendance form. On the top of the form I want a
DatePicker which the employee will use to enter the first day of the month.
Using that value, I want a table to fill up with the dates and days of the
week... i.e. One column showing the date, one showing the day "Monday", and
then one with a text field for an attendance code...
I have fiddled with some JScript code and I can pop up a messagebox that,
say, adds a day onto today's date. Something like this:
function CTRL3_5::OnClick(eventObj)
{
today = new Date(); // Get today's date.
yesterdayDate = today.getDate() - 1 ;
today.setDate( yesterdayDate );
XDocument.UI.Alert("Yesterday was " + today)};
What I want to know is how I could use the value that the employee enters in
the DatePicker and stick it into the formula above... or is that even
possible?
Thanks