本例中用的是easyUI的datebox $('#cal_birthday').datebox({ onSelect: function(date){ //根据选则的日期计算年龄 //alert(date.getFullYear()+":"+(date.getMonth()+1)+":"+date.getDate()); // 2017:6:12 var years = 0; var diff = 0; d = new Date(); if(date.getFull
import java.util.Calendar; import android.widget.DatePicker; import android.app.DatePickerDialog; //日期对话框的标记 常量 private static final int DATE_DIALOG_ID = 1; private static final int SHOW_DATAPICK = 0; //日期变量 private int mYear; private int mMonth; pri