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

DateTIMEpicker, datepicker starts on 1970 #148

Open
Nickinfinity opened this issue May 23, 2013 · 0 comments
Open

DateTIMEpicker, datepicker starts on 1970 #148

Nickinfinity opened this issue May 23, 2013 · 0 comments

Comments

@Nickinfinity
Copy link

I'm Trying use a timepicker to choose date and hour in mysql timestamp format: yyyy-mm-dd 00:00:00, use datepicker form jqideal forms and add manualy the time...

using a custom filter:
timestamp: {
regex: '/^(((\d{4})(-)(0[13578]|10|12)(-)(0[1-9]|[12][0-9]|3[01]))|((\d{4})(-)(0[469]|1‌​1)(-)([0][1-9]|[12][0-9]|30))|((\d{4})(-)(02)(-)(0[1-9]|1[0-9]|2[0-8]))|(([02468]‌​[048]00)(-)(02)(-)(29))|(([13579][26]00)(-)(02)(-)(29))|(([0-9][0-9][0][48])(-)(0‌​2)(-)(29))|(([0-9][0-9][2468][048])(-)(02)(-)(29))|(([0-9][0-9][13579][26])(-)(02‌​)(-)(29)))(\s([0-1][0-9]|2[0-4]):([0-5][0-9]):([0-5][0-9]))$/',
error: 'My custom error'
}

and
filters: 'required timestamp',
data: { date: 'yyyy-mm-dd 00:00:00' } // or yyyy~dd~mm or mm*yyyy*dd
}

but on blur or focus out on the field with the dateTIME it changes the format yyyy-mm-dd 00:00:00 deleting time/hour = yyyy-mm-dd what should I do?

AND... datepicker starts on 1970 how I set it on 'today' as defalut?

Thank you for your help and sorry for bad english I hope you will can understand me.

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

1 participant