Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SplitDateTimeWidget #33

Open
ollytheninja opened this issue Aug 6, 2014 · 6 comments
Open

SplitDateTimeWidget #33

ollytheninja opened this issue Aug 6, 2014 · 6 comments

Comments

@ollytheninja
Copy link

I think there should be a SplitDateTimeWidget.
Not sure who else would find this useful, I may be able to do this later, just thought I'd put it out there.

@michaeljones
Copy link
Contributor

+1

I think I would find this useful. It would be nice to be able to adjust the time without navigating the date again but have it all wrapped up as one field. Though honestly, I've not looked into how easy it is to achieve that set up at the moment.

Have you had any luck with it? I'm happy to help.

@asaglimbeni
Copy link
Owner

It should be not so hard to do following the same approch of django https://docs.djangoproject.com/en/dev/ref/forms/widgets/#django.forms.MultiWidget.decompress
So what we need is onlt to manage the retunr value of the decopress method here, https://github.com/asaglimbeni/django-datetime-widget/blob/master/datetimewidget/widgets.py#L178.
Obviously we need a new subclass SplitDateTimeWidget that rewrite only decopress method.
Let me know what do you thing , we could integrate it also in the last Michel's pull request

@ollytheninja
Copy link
Author

I don't have much time to work on it at the moment, so if anyone else wants to give it a crack feel free :)
I will let you know if I give it a go!

@ollytheninja
Copy link
Author

I gave it a go, but I'm not 100% sure it works properly ( I'm new to this! )
Feedback appreciated! 77ea6eb

@siolag161 siolag161 mentioned this issue Mar 17, 2015
@symbiosdotwiki
Copy link

any leads with this?

@ollytheninja
Copy link
Author

Thanks @nwaxiomatic , #74 looks much tidier than mine! 😄

edit: because apparently I'm blind.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants