Posts

Showing posts from December 3, 2018

Validate two forms inside one form element with ParsleyJS

Image
up vote 0 down vote favorite I'm building two forms which will live on a single page on a Kentico website. kentico websites are wrapped in one single form field so I can't create individual form elements for each form on the page. The problem is parsleyJS will only allow you to pass a form to initialise it e.g. $("#form").parsley(); and I need to validate the forms independent of each other. Has anyone had this issue before? Can anyone recommend a workaround. $("#form").parsley(); input{ display:block; } <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/parsley.js/2.8.1/parsley.min.js"></script> <form action="" id="form"> &l

How to compare 2 timestamps (date + time + timezone) [duplicate]

Image
up vote -1 down vote favorite This question already has an answer here: Compare two timestamps in Python 2 answers I got 2 dates from my database and I need to compare if one date is greater than another one. I got the date in this format: 2018-11-07 18:00:40.679087+00:00 2018-11-14 00:00:17.908676+00:00 I tried a lot of solutions, but I didn't figured it out how it works fine. ps.: I got a lot of questions that looks like this one, but in my case I have the timezone to consider that's the difference. python share | improve this question edited Nov 19 at 1