User Inputted Date Query |
[eluser]LifeSteala[/eluser]
Hi, I have a form which has a field -> "Due Date". I have a javascript widget which let's user's select a date, and whatever they select goes into it's input field like so: "28/8/2007". I have a MySQL table with a DATETIME field. How do I insert this?? I've searched forums, and have had no luck. Thanks
[eluser]Derek Allard[/eluser]
Here's how I do it in BambooInvoice. I have a hidden field, and in the "selection javascript" I use it to change that field's value. Go in and play with the demo, and I think you'll see what I mean. Obviously, its something that requires some JS know-how.
[eluser]LifeSteala[/eluser]
Sorry, I should have elaborated it abit more. When I say how do I insert this, I mean how do I take the value "28/8/2007" from the input box and insert it into MySQL database with a field that is DATETIME.. I have the JS working and all, I can select dates and all. Just not sure how to insert this in the table... Hope that makes sense. I appreciate your reply.
[eluser]Derek Allard[/eluser]
Why don't you just edit the js to pass the information the way you're expecting? Barring that, I think you'll need to str_replace or explode the string, so that you could reformat it. |
Welcome Guest, Not a member yet? Register Sign In |