Is the selected date in a db field? Then when editing the same field, the
date picker should show the selected date.
If the date is still not saved to a db field but only in js, then you can
send it using something similar to this
<script type = "text/javascript">
<!--
do {
var correctValues = ["1", "2", "3", ""];
var retVal = prompt("{{=T('Starting position')}} (1, 2,
3): ", "1");
} while (!(retVal in correctValues) & retVal !== null);
if (retVal === null) {
window.location.href = "{{=request.env.http_referer}}";
} else {
window.location.href = "{{
url = 'https://' if request.is_https else 'http://'
url += request.env.http_host + request.url + '/'
=url
}}" + retVal + "?{{=request.env.query_string}}";
}
//-->
</script>
quinta-feira, 25 de Abril de 2019 às 20:40:25 UTC+1, Andrea Fae' escreveu:
>
> How to preserve datepicker selected date after postback using web2py in a
> javascript view... I think it's a javascript problem but I don't know how
> to fix it.
> thank you
>
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.