PDA

View Full Version : Input date into input box on website not working correctly



cfernand74
04-11-2014, 08:32 AM
When I use code to transfer date from excel to web form it gets changed from 10/10/2013 to Thu Oct 10 2013 00:00:00 GMT/0400 (Eastern Daylight Time). The input box that the date goes into has popup of a calendar as soon I manually click on the input box. I can manually enter 10/10/2014 even 9/10/2014 and it work the way it should. But with code no matter how I try it I have had no good result.

My thought on possibly solving this is to enter date one character at a time and see if it works via Sendkeys , but i don't know how to do that with code. I need also make sure I make reference to the form and value as below and I don't know where to code the sendkey and make it enter one character at a time. So again whatever date is entered in code is not represented in form correctly unless the website sees it as if it’s being done manually.
The code I currently use to code into text box is:
IE.Document.forms("Form").all("AssessedValueDate").Value = "date"


The HTML code is:
<input tabindex="1000" class="qbo-date scoreitem qbo-date-required validation-failed" id="AssessedValueDate" type="text" value="">

Please help.

cfernand74
04-12-2014, 09:23 AM
Here is a sample website that i found that appears to use the same type of dynamic date. Unfortunately its in a website that uses iframe which is different from the website i am using on this issue. Either way need i to learn how to access iframe website, because i have other website i need to get data into. Once in please check on solving my date issue as described above.

Just a note i thing the issue is with the dynamic date it must be parsing the date being entered 10/10/2013 and interpreting its own way. i can get the date into the input field the issue is shown when i move to the next input field the date again changes to Thu Oct 10 2013 00:00:00 GMT/0400 (Eastern Daylight Time). How do i keep the format the same as 10/10/2013
http://jqueryui.com/datepicker/

cfernand74
06-08-2014, 09:18 PM
Did not get help from anyone, but i figure come back and post this anyways for those that come to have same problem.
The working code to get the date transffered correctly the internet form and show as it shows in excel work sheet is as follow:
The date on excel work sheet cell would show: 10/10/2014
i would use:
IE.Document.getElementsByName("textboxlinkword")(0).Value = Format(Range("a2"), "Short Date")

Aussiebear
06-08-2014, 09:42 PM
Thank you for your efforts here.