Terry Gilliver
Posts: 0
Joined: Fri Apr 18, 2014 8:45 pm

date fields have unusual rendering on some devices

I have an input component of type 'date'. On the appery browser using chrome it gives a date picker. On my old android 2.3 it renders as a normal text field. I understand this as the internal browser probably is not html5 compliant. On my tablet running android 4.2.2, it shows a blank field, not even showing the place holder text, and pops up the on screen keyboard to fill in the field. Should it not have some kind of date picker?

If this is a html5 compliance problem, is there another way to show a date picker?

Kateryna Grynko
Posts: 0
Joined: Thu Nov 15, 2012 9:13 am

date fields have unusual rendering on some devices

Hi Terry,

Have you tried a Datepicker component?
http://devcenter.appery.io/documentat...

Terry Gilliver
Posts: 0
Joined: Fri Apr 18, 2014 8:45 pm

date fields have unusual rendering on some devices

yes, that's what I needed. Is it possible to configure the min and max dates in javascript? Also I can't access the date value with Appery('date_input').val() anymore, how do I access this?

Terry Gilliver
Posts: 0
Joined: Fri Apr 18, 2014 8:45 pm

date fields have unusual rendering on some devices

I have tried:

codevar date = Appery('date_input').datepicker('getDate');/code

thinking you were using the standard jQuery Mobile datepicker, but this gives me a console error:

Uncaught TypeError: undefined is not a function

I tried the following in Page Show event:

codevar today = new Date();
Appery('date_input').datepicker({minDate: today});
Appery('date_input').datepicker({maxDate: '+1w'});/code

This also gave console error

Evgene Karachevtsev
Posts: 12
Joined: Mon Apr 28, 2014 1:12 pm

date fields have unusual rendering on some devices

Terry,

  1. You can set min and max dates in the right column - "PROPERTIES"
  2. To get selected date please use method preApperyio("mobiledatepicker_17").getAttr('defaultDateValue') /pre
    where mobiledatepicker_17 is you datepicker component name
Terry Gilliver
Posts: 0
Joined: Fri Apr 18, 2014 8:45 pm

date fields have unusual rendering on some devices

That works. However I want to set the date range from today to + 1week. which is why I need to do it in Javascript

Maryna Brodina
Posts: 0
Joined: Thu Apr 05, 2012 7:27 am

date fields have unusual rendering on some devices

Hello!

You can set min and max dates this way:preApperyio("mobiledatepicker_30").datepicker_dataPickerOptions.maxDate = "+1M +10D";/prepreApperyio("mobiledatepicker_30").datepicker_dataPickerOptions.minDate = -20;/prewhere mobiledatepicker_30 is your datepicker's name property

Terry Gilliver
Posts: 0
Joined: Fri Apr 18, 2014 8:45 pm

date fields have unusual rendering on some devices

That works great, Thanks Maryna

Aeneas McBurney
Posts: 0
Joined: Mon Jun 16, 2014 7:49 am

date fields have unusual rendering on some devices

Hi,

I want to set the date of a input component with a date value today in code but have so far been unsuccessful. My code is

var datefrom = new Date()
Appery('invDateTo').attr('value',datefrom);

I have also tried
Appery('invDateTo').val(datefrom);

I do not what to use the datepicker component.

Can you please help?

Thanks,
Aeneas

Alena Prykhodko
Posts: 0
Joined: Tue Apr 09, 2013 7:36 am

date fields have unusual rendering on some devices

Hello,

Works well for us: http://gyazo.com/aba2d9189a744060cb79... - simple date object inside
http://gyazo.com/236c31f04a49aad21962... - with a extra variable
http://gyazo.com/60382ef16006fcb8151d... - even Appery instead Apperyio works

1) Do you have errors in your code?
2) Do you have any other errors in console, before evaluating the code
3) When do you call your JavaScript ? It should be on Page Show, not on Load

Return to “Issues”